Commit 7360927afe

Andrew Kelley <andrew@ziglang.org>
2023-08-03 05:11:59
CLI: add native paths only if ABI is also native
1 parent c012f5d
Changed files (1)
src/main.zig
@@ -2674,7 +2674,7 @@ fn buildOutputType(
     // After this point, external_system_libs is used instead of system_libs.
 
     // Trigger native system library path detection if necessary.
-    if (sysroot == null and cross_target.isNativeOs() and
+    if (sysroot == null and cross_target.isNativeOs() and cross_target.isNativeAbi() and
         (external_system_libs.len != 0 or want_native_include_dirs))
     {
         const paths = std.zig.system.NativePaths.detect(arena, target_info) catch |err| {