| author | |
| committer | |
| log | b183b612c938a8c9949fee02fa55038273595496 |
| tree | 42572a7f3df5f0c2aec19f888fa8bd10f6fe439b |
| parent | f4dde4d109ecd722ac82243417cac9f0e736de94 |
2 files changed, 16 insertions(+), 1 deletions(-)
src/Compilation.zig+2-1| ... | @@ -1883,7 +1883,8 @@ fn wantBuildLibUnwindFromSource(comp: *Compilation) bool { | ... | @@ -1883,7 +1883,8 @@ fn wantBuildLibUnwindFromSource(comp: *Compilation) bool { |
| 1883 | .Exe => true, | 1883 | .Exe => true, |
| 1884 | }; | 1884 | }; |
| 1885 | return comp.bin_file.options.link_libc and is_exe_or_dyn_lib and | 1885 | return comp.bin_file.options.link_libc and is_exe_or_dyn_lib and |
| 1886 | comp.bin_file.options.libc_installation == null; | 1886 | comp.bin_file.options.libc_installation == null and |
| 1887 | target_util.libcNeedsLibUnwind(comp.getTarget()); | ||
| 1887 | } | 1888 | } |
| 1888 | 1889 | ||
| 1889 | fn updateBuiltinZigFile(comp: *Compilation, mod: *Module) !void { | 1890 | fn updateBuiltinZigFile(comp: *Compilation, mod: *Module) !void { |
src/target.zig+14| ... | @@ -128,6 +128,20 @@ pub fn osRequiresLibC(target: std.Target) bool { | ... | @@ -128,6 +128,20 @@ pub fn osRequiresLibC(target: std.Target) bool { |
| 128 | }; | 128 | }; |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | pub fn libcNeedsLibUnwind(target: std.Target) bool { | ||
| 132 | return switch (target.os.tag) { | ||
| 133 | .windows, | ||
| 134 | .macosx, | ||
| 135 | .ios, | ||
| 136 | .watchos, | ||
| 137 | .tvos, | ||
| 138 | .freestanding, | ||
| 139 | => false, | ||
| 140 | |||
| 141 | else => true, | ||
| 142 | }; | ||
| 143 | } | ||
| 144 | |||
| 131 | pub fn requiresPIE(target: std.Target) bool { | 145 | pub fn requiresPIE(target: std.Target) bool { |
| 132 | return target.isAndroid(); | 146 | return target.isAndroid(); |
| 133 | } | 147 | } |