diff options
| author | gingerBill <bill@gingerbill.org> | 2024-07-15 00:43:46 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-07-15 00:43:46 +0100 |
| commit | c64702ae5ad57240743fc425bb5029fb9c1cc02e (patch) | |
| tree | b105d0a663502a339e41d5150c25b0a57f3e7bb1 /src/build_settings.cpp | |
| parent | 3311ea1c7667364af9cd3f233d1a774e50879e3c (diff) | |
Make `-use-separate-modules` the default behaviour for `-o:none` and `-o:minimal`
Diffstat (limited to 'src/build_settings.cpp')
| -rw-r--r-- | src/build_settings.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/build_settings.cpp b/src/build_settings.cpp index 32640d732..47f7bf5ba 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -1658,6 +1658,13 @@ gb_internal void init_build_context(TargetMetrics *cross_target, Subtarget subta bc->optimization_level = gb_clamp(bc->optimization_level, -1, 3); + if (bc->optimization_level <= 0) { + if (!is_arch_wasm()) { + bc->use_separate_modules = true; + } + } + + // TODO: Static map calls are bugged on `amd64sysv` abi. if (bc->metrics.os != TargetOs_windows && bc->metrics.arch == TargetArch_amd64) { // ENFORCE DYNAMIC MAP CALLS |