Browse Source

llvm-18: enable static map calls on non amd64sysv targets

Laytan Laats 1 year ago
parent
commit
f9a7d2bf04
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/build_settings.cpp

+ 2 - 3
src/build_settings.cpp

@@ -2016,12 +2016,11 @@ gb_internal void init_build_context(TargetMetrics *cross_target, Subtarget subta
 
 	bc->optimization_level = gb_clamp(bc->optimization_level, -1, 3);
 
-	#if LLVM_VERSION_MAJOR < 18
-	if (bc->metrics.os != TargetOs_windows) {
+	// TODO: Static map calls are bugged on `amd64sysv` abi.
+	if (bc->metrics.os != TargetOs_windows && bc->metrics.arch == TargetArch_amd64) {
 		// ENFORCE DYNAMIC MAP CALLS
 		bc->dynamic_map_calls = true;
 	}
-	#endif
 
 	bc->ODIN_VALGRIND_SUPPORT = false;
 	if (build_context.metrics.os != TargetOs_windows) {