Merge pull request #22516 from Jan200101/PR/build_id_option

std.Build: add build-id option
This commit is contained in:
Andrew Kelley
2025-04-11 16:37:46 -04:00
committed by GitHub
5 changed files with 26 additions and 11 deletions

View File

@@ -1694,7 +1694,7 @@ fn getZigArgs(compile: *Compile, fuzz: bool) ![][]const u8 {
try addFlag(&zig_args, "each-lib-rpath", compile.each_lib_rpath);
if (compile.build_id) |build_id| {
if (compile.build_id orelse b.build_id) |build_id| {
try zig_args.append(switch (build_id) {
.hexstring => |hs| b.fmt("--build-id=0x{s}", .{
std.fmt.fmtSliceHexLower(hs.toSlice()),