Skip to content

Commit

Permalink
Fix libunwind macro.
Browse files Browse the repository at this point in the history
  • Loading branch information
yxd-ym committed Feb 4, 2024
1 parent ef79db0 commit 59a021d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion zig/src/libunwind.zig
Expand Up @@ -102,7 +102,9 @@ pub fn buildStaticLib(comp: *Compilation, prog_node: *std.Progress.Node) !void {
// This is intentionally always defined because the macro definition means, should it only
// build for the target specified by compiler defines. Since we pass -target the compiler
// defines will be correct.
try cflags.append("-D_LIBUNWIND_IS_NATIVE_ONLY");
if (target.cpu.arch != std.Target.Cpu.Arch.loongarch64) {
try cflags.append("-D_LIBUNWIND_IS_NATIVE_ONLY");
}

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

0 comments on commit 59a021d

Please sign in to comment.