diff options
| author | xavier <xavierb@gmail.com> | 2021-05-21 08:57:14 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-05-24 13:48:49 -0400 |
| commit | 8275c771c8f525b7f2917d1f4ade9b5e684d0a12 (patch) | |
| tree | 028268567456f2f4355492e797c46de51d8437e1 /src/Compilation.zig | |
| parent | 1df993706aaac77455bbd103c8abf88beaf74e6b (diff) | |
| download | zig-8275c771c8f525b7f2917d1f4ade9b5e684d0a12.tar.gz zig-8275c771c8f525b7f2917d1f4ade9b5e684d0a12.zip | |
zig cc: expose header files when linking libunwind
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 023a54ca8d..e20ee038c1 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -2776,6 +2776,15 @@ pub fn addCCArgs( try argv.append("-D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS"); } + if (comp.bin_file.options.link_libunwind) { + const libunwind_include_path = try std.fs.path.join(arena, &[_][]const u8{ + comp.zig_lib_directory.path.?, "libunwind", "include", + }); + + try argv.append("-isystem"); + try argv.append(libunwind_include_path); + } + const llvm_triple = try @import("codegen/llvm.zig").targetTriple(arena, target); try argv.appendSlice(&[_][]const u8{ "-target", llvm_triple }); |
