-default-to-panic-allocator

This commit is contained in:
gingerBill
2024-01-28 22:09:20 +00:00
parent 9be9f0bb2c
commit 395e0fb225
5 changed files with 37 additions and 15 deletions
+3 -1
View File
@@ -323,6 +323,7 @@ struct BuildContext {
bool ODIN_DEBUG; // Odin in debug mode
bool ODIN_DISABLE_ASSERT; // Whether the default 'assert' et al is disabled in code or not
bool ODIN_DEFAULT_TO_NIL_ALLOCATOR; // Whether the default allocator is a "nil" allocator or not (i.e. it does nothing)
bool ODIN_DEFAULT_TO_PANIC_ALLOCATOR; // Whether the default allocator is a "panic" allocator or not (i.e. panics on any call to it)
bool ODIN_FOREIGN_ERROR_PROCEDURES;
bool ODIN_VALGRIND_SUPPORT;
@@ -1609,7 +1610,8 @@ gb_internal bool init_build_paths(String init_filename) {
}
if (build_context.ODIN_DEFAULT_TO_NIL_ALLOCATOR) {
if (build_context.ODIN_DEFAULT_TO_NIL_ALLOCATOR ||
build_context.ODIN_DEFAULT_TO_PANIC_ALLOCATOR) {
bc->no_dynamic_literals = true;
}