Skip to content

Commit 59a021d

Browse files
committed
Fix libunwind macro.
1 parent ef79db0 commit 59a021d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

zig/src/libunwind.zig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ pub fn buildStaticLib(comp: *Compilation, prog_node: *std.Progress.Node) !void {
102102
// This is intentionally always defined because the macro definition means, should it only
103103
// build for the target specified by compiler defines. Since we pass -target the compiler
104104
// defines will be correct.
105-
try cflags.append("-D_LIBUNWIND_IS_NATIVE_ONLY");
105+
if (target.cpu.arch != std.Target.Cpu.Arch.loongarch64) {
106+
try cflags.append("-D_LIBUNWIND_IS_NATIVE_ONLY");
107+
}
106108

107109
if (comp.root_mod.optimize_mode == .Debug) {
108110
try cflags.append("-D_DEBUG");

0 commit comments

Comments
 (0)