diff options
| author | gingerBill <bill@gingerbill.org> | 2022-02-23 11:29:36 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-02-23 11:29:36 +0000 |
| commit | 196bd735d4c30964182fdf1f374f767ccb0912fa (patch) | |
| tree | 701f77ada4572141224816c5458895700f4d61ab /src/build_settings.cpp | |
| parent | 493bc653b5762514dac8c8941d6564ccf5bb8528 (diff) | |
Replace local `@(no_red_zone)` with global `-disable-red-zone`
Diffstat (limited to 'src/build_settings.cpp')
| -rw-r--r-- | src/build_settings.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/build_settings.cpp b/src/build_settings.cpp index 790f7f1bc..62f43fad3 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -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 |