diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-05-17 07:19:15 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-17 07:19:15 -0700 |
| commit | c1add1e19ea35b4d96fbab317410276f757510ef (patch) | |
| tree | 9791032b09046f6d5b785cd643439b266737cab4 /src/Compilation.zig | |
| parent | 5b06daf52bdeaf18b40909ef878e8b19b3d14019 (diff) | |
| parent | 728ce2d7c18e23ca6c36d86f4ee1ea4ce3ac81e2 (diff) | |
| download | zig-c1add1e19ea35b4d96fbab317410276f757510ef.tar.gz zig-c1add1e19ea35b4d96fbab317410276f757510ef.zip | |
Merge pull request #15459 from motiejus/build-id-full
stage2: implement `--build-id` styles
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 0818eaafdd..0a01e9465c 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -29,6 +29,7 @@ const wasi_libc = @import("wasi_libc.zig"); const fatal = @import("main.zig").fatal; const clangMain = @import("main.zig").clangMain; const Module = @import("Module.zig"); +const BuildId = std.Build.CompileStep.BuildId; const Cache = std.Build.Cache; const translate_c = @import("translate_c.zig"); const clang = @import("clang.zig"); @@ -563,7 +564,7 @@ pub const InitOptions = struct { linker_print_map: bool = false, linker_opt_bisect_limit: i32 = -1, each_lib_rpath: ?bool = null, - build_id: ?bool = null, + build_id: ?BuildId = null, disable_c_depfile: bool = false, linker_z_nodelete: bool = false, linker_z_notext: bool = false, @@ -797,7 +798,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { const unwind_tables = options.want_unwind_tables orelse (link_libunwind or target_util.needUnwindTables(options.target)); const link_eh_frame_hdr = options.link_eh_frame_hdr or unwind_tables; - const build_id = options.build_id orelse false; + const build_id = options.build_id orelse .none; // Make a decision on whether to use LLD or our own linker. const use_lld = options.use_lld orelse blk: { @@ -828,7 +829,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { options.output_mode == .Lib or options.linker_script != null or options.version_script != null or options.emit_implib != null or - build_id or + build_id != .none or options.symbol_wrap_set.count() > 0) { break :blk true; |
