diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-09-24 23:50:15 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-09-24 23:50:15 -0700 |
| commit | 30dfdfdbd09570f97420413015eb8a1517382961 (patch) | |
| tree | 6e4e3f43eaa0f870629a9f969907e3adee8d1bfa /src/libunwind.zig | |
| parent | 7964341c76fab985b06a5022b88ceb261305ffaf (diff) | |
| download | zig-30dfdfdbd09570f97420413015eb8a1517382961.tar.gz zig-30dfdfdbd09570f97420413015eb8a1517382961.zip | |
fix a round of regressions in this branch
* Don't try to generate C header files yet since it will only cause a
crash saying the feature is unimplemented.
* Rename the CLI options for release modes to use the `-O` prefix to
match C compiler precedent. Options are now `-ODebug`,
`-OReleaseFast`, `-OReleaseSafe`, `-OReleaseSmall`. The optimization
mode matches the enum tags of std.builtin.Mode. It is planned to, at
some point, rename std.builtin.Mode to std.builtin.OptimizationMode
and modify the tags to be lower case to match the style convention.
- Update build.zig code to support this new CLI.
* update std.zig.binNameAlloc to support an optional Version and update
the implementation to correctly deal with dynamic library version
suffixes.
Diffstat (limited to 'src/libunwind.zig')
| -rw-r--r-- | src/libunwind.zig | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libunwind.zig b/src/libunwind.zig index 28445b7284..cbe632ba94 100644 --- a/src/libunwind.zig +++ b/src/libunwind.zig @@ -23,13 +23,16 @@ pub fn buildStaticLib(comp: *Compilation) !void { const output_mode = .Lib; const link_mode = .Static; const target = comp.getTarget(); - const basename = try std.zig.binNameAlloc(arena, root_name, target, output_mode, link_mode, null); - + const basename = try std.zig.binNameAlloc(arena, .{ + .root_name = root_name, + .target = target, + .output_mode = output_mode, + .link_mode = link_mode, + }); const emit_bin = Compilation.EmitLoc{ .directory = null, // Put it in the cache directory. .basename = basename, }; - const unwind_src_list = [_][]const u8{ "libunwind" ++ path.sep_str ++ "src" ++ path.sep_str ++ "libunwind.cpp", "libunwind" ++ path.sep_str ++ "src" ++ path.sep_str ++ "Unwind-EHABI.cpp", @@ -40,7 +43,6 @@ pub fn buildStaticLib(comp: *Compilation) !void { "libunwind" ++ path.sep_str ++ "src" ++ path.sep_str ++ "UnwindRegistersRestore.S", "libunwind" ++ path.sep_str ++ "src" ++ path.sep_str ++ "UnwindRegistersSave.S", }; - var c_source_files: [unwind_src_list.len]Compilation.CSourceFile = undefined; for (unwind_src_list) |unwind_src, i| { var cflags = std.ArrayList([]const u8).init(arena); |
