Commit 41f6627521

Andrew Kelley <andrew@ziglang.org>
2020-09-29 09:25:48
stage2: infer --strip on wasm builds
1 parent af6c3a3
Changed files (1)
src/target.zig
@@ -143,7 +143,7 @@ pub fn libcNeedsLibUnwind(target: std.Target) bool {
 }
 
 pub fn requiresPIE(target: std.Target) bool {
-    return target.isAndroid();
+    return target.isAndroid() or target.isDarwin();
 }
 
 /// This function returns whether non-pic code is completely invalid on the given target.
@@ -336,3 +336,7 @@ pub fn is_libcpp_lib_name(target: std.Target, name: []const u8) bool {
         eqlIgnoreCase(ignore_case, name, "stdc++") or
         eqlIgnoreCase(ignore_case, name, "c++abi");
 }
+
+pub fn hasDebugInfo(target: std.Target) bool {
+    return !target.cpu.arch.isWasm();
+}