diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-05-15 21:44:38 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-05-15 21:44:38 -0700 |
| commit | 597082adf45cebbf2c6a81c3f732b6d2ce4a1435 (patch) | |
| tree | 9309977e204cceaac2c18efbea2153a69f86d1f4 /src/main.zig | |
| parent | 07606d12daabe8c201dba3d5b27e702ce58d0ffb (diff) | |
| parent | d98e39fa6864f287bc50f265f98b7195849afa68 (diff) | |
| download | zig-597082adf45cebbf2c6a81c3f732b6d2ce4a1435.tar.gz zig-597082adf45cebbf2c6a81c3f732b6d2ce4a1435.zip | |
Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen
Conflicts:
* build.zig
* src/Compilation.zig
* src/codegen/spirv/spec.zig
* src/link/SpirV.zig
* test/stage2/darwin.zig
- this one might be problematic; start.zig looks for `main` in the
root source file, not `_main`. Not sure why there is an underscore
there in master branch.
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig index e2ec2fc1fc..e6cfc5f1a9 100644 --- a/src/main.zig +++ b/src/main.zig @@ -544,6 +544,7 @@ fn buildOutputType( var ensure_libcpp_on_non_freestanding = false; var link_libc = false; var link_libcpp = false; + var link_libunwind = false; var want_native_include_dirs = false; var enable_cache: ?bool = null; var want_pic: ?bool = null; @@ -1556,6 +1557,11 @@ fn buildOutputType( _ = system_libs.orderedRemove(i); continue; } + if (mem.eql(u8, lib_name, "unwind")) { + link_libunwind = true; + _ = system_libs.orderedRemove(i); + continue; + } if (std.fs.path.isAbsolute(lib_name)) { fatal("cannot use absolute path as a system library: {s}", .{lib_name}); } @@ -1871,6 +1877,7 @@ fn buildOutputType( .system_libs = system_libs.items, .link_libc = link_libc, .link_libcpp = link_libcpp, + .link_libunwind = link_libunwind, .want_pic = want_pic, .want_pie = want_pie, .want_lto = want_lto, |
