stage2: infer --strip on wasm builds

master
Andrew Kelley 2020-09-29 00:25:48 -07:00
parent af6c3a3934
commit 41f6627521
1 changed files with 5 additions and 1 deletions

View File

@ -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();
}