mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-15 23:54:07 +00:00
Merge pull request #3496 from laytan/allow-default-to-nil-allocator-on-wasm
wasm: allow `-default-to-nil-allocator`
This commit is contained in:
@@ -1583,8 +1583,10 @@ gb_internal void init_build_context(TargetMetrics *cross_target, Subtarget subta
|
||||
if (bc->metrics.os == TargetOs_js || bc->metrics.os == TargetOs_wasi) {
|
||||
// TODO(bill): Should these even have a default "heap-like" allocator?
|
||||
}
|
||||
bc->ODIN_DEFAULT_TO_PANIC_ALLOCATOR = true;
|
||||
bc->ODIN_DEFAULT_TO_NIL_ALLOCATOR = !bc->ODIN_DEFAULT_TO_PANIC_ALLOCATOR;
|
||||
|
||||
if (!bc->ODIN_DEFAULT_TO_NIL_ALLOCATOR && !bc->ODIN_DEFAULT_TO_PANIC_ALLOCATOR) {
|
||||
bc->ODIN_DEFAULT_TO_PANIC_ALLOCATOR = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user