Suppress codegen of panic printing with when panic messages are set to "off".

Implicit linking of libc math when libc math functions are used.
This commit is contained in:
Christoffer Lerno
2025-07-17 14:44:12 +02:00
parent da4105ffb1
commit ee35001732
7 changed files with 86 additions and 84 deletions

View File

@@ -8,12 +8,9 @@ import libc;
<*
The LibcAllocator is a wrapper around malloc to conform to the Allocator interface.
*>
typedef LibcAllocator (Allocator, Printable) = uptr;
typedef LibcAllocator (Allocator) = uptr;
const LibcAllocator LIBC_ALLOCATOR = {};
fn String LibcAllocator.to_string(&self, Allocator allocator) @dynamic => "Libc allocator".copy(allocator);
fn usz? LibcAllocator.to_format(&self, Formatter *format) @dynamic => format.print("Libc allocator");
module std::core::mem::allocator @if(env::POSIX);
import std::os;
import libc;