mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-16 16:14:06 +00:00
Replace local @(no_red_zone) with global -disable-red-zone
This commit is contained in:
@@ -278,6 +278,7 @@ struct BuildContext {
|
||||
bool copy_file_contents;
|
||||
|
||||
RelocMode reloc_mode;
|
||||
bool disable_red_zone;
|
||||
|
||||
|
||||
u32 cmd_doc_flags;
|
||||
@@ -1002,6 +1003,13 @@ void init_build_context(TargetMetrics *cross_target) {
|
||||
bc->threaded_checker = true;
|
||||
#endif
|
||||
|
||||
if (bc->disable_red_zone) {
|
||||
if (!(bc->metrics.os == TargetOs_freestanding && !is_arch_wasm())) {
|
||||
gb_printf_err("-disable-red-zone is not support for this target");
|
||||
gb_exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// NOTE(zangent): The linker flags to set the build architecture are different
|
||||
// across OSs. It doesn't make sense to allocate extra data on the heap
|
||||
|
||||
Reference in New Issue
Block a user