Make -use-separate-modules the default behaviour for -o:none and -o:minimal

This commit is contained in:
gingerBill
2024-07-15 00:43:46 +01:00
parent 3311ea1c76
commit c64702ae5a
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -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