authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-08-14 18:27:09-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-08-19 12:39:36-07:00
log65b8b8b27bb4671443403e3d88534c0238b3c940
tree02d8e9227f7e1ff803343ed0cd260bc80f64139c
parent414641eb95cd006f4f291d259fe912885050bd2c

std.Build.Cache: remove deprecated APIs

improves Path hygiene in the compiler in some places also includes an assertion that will probably nede to be removed regarding absolute paths making it into the cache manifest

12 files changed, 75 insertions(+), 97 deletions(-)

lib/std/Build/Cache.zig+3-28
......@@ -417,19 +417,8 @@ pub const Manifest = struct {
417417 return addFileInner(m, prefixed_path, handle, max_file_size);
418418 }
419419
420 /// Deprecated; use `addFilePath`.
421 pub fn addFile(self: *Manifest, file_path: []const u8, max_file_size: ?usize) !usize {
422 assert(self.manifest_file == null);
423
424 const gpa = self.cache.gpa;
425 try self.files.ensureUnusedCapacity(gpa, 1);
426 const prefixed_path = try self.cache.findPrefix(file_path);
427 errdefer gpa.free(prefixed_path.sub_path);
428
429 return addFileInner(self, prefixed_path, null, max_file_size);
430 }
431
432420 fn addFileInner(self: *Manifest, prefixed_path: PrefixedPath, handle: ?Io.File, max_file_size: ?usize) usize {
421 assert(!std.fs.path.isAbsolute(prefixed_path.sub_path));
433422 const gop = self.files.getOrPutAssumeCapacityAdapted(prefixed_path, FilesAdapter{});
434423 if (gop.found_existing) {
435424 self.cache.gpa.free(prefixed_path.sub_path);
......@@ -452,26 +441,12 @@ pub const Manifest = struct {
452441 return gop.index;
453442 }
454443
455 /// Deprecated, use `addOptionalFilePath`.
456 pub fn addOptionalFile(self: *Manifest, optional_file_path: ?[]const u8) !void {
457 self.hash.add(optional_file_path != null);
458 const file_path = optional_file_path orelse return;
459 _ = try self.addFile(file_path, null);
460 }
461
462444 pub fn addOptionalFilePath(self: *Manifest, optional_file_path: ?Path) !void {
463445 self.hash.add(optional_file_path != null);
464446 const file_path = optional_file_path orelse return;
465447 _ = try self.addFilePath(file_path, null);
466448 }
467449
468 pub fn addListOfFiles(self: *Manifest, list_of_files: []const []const u8) !void {
469 self.hash.add(list_of_files.len);
470 for (list_of_files) |file_path| {
471 _ = try self.addFile(file_path, null);
472 }
473 }
474
475450 pub fn addDepFile(self: *Manifest, dir: Io.Dir, dep_file_sub_path: []const u8) !void {
476451 assert(self.manifest_file == null);
477452 return self.addDepFileMaybePost(dir, dep_file_sub_path);
......@@ -1127,13 +1102,13 @@ pub const Manifest = struct {
11271102 // Clang is invoked in single-source mode but other programs may not
11281103 .target, .target_must_resolve => {},
11291104 .prereq => |file_path| if (self.manifest_file == null) {
1130 _ = try self.addFile(file_path, null);
1105 _ = try self.addFilePath(.initCwd(file_path), null);
11311106 } else try self.addFilePost(file_path),
11321107 .prereq_must_resolve => {
11331108 resolve_buf.clearRetainingCapacity();
11341109 try token.resolve(gpa, &resolve_buf);
11351110 if (self.manifest_file == null) {
1136 _ = try self.addFile(resolve_buf.items, null);
1111 _ = try self.addFilePath(.initCwd(resolve_buf.items), null);
11371112 } else try self.addFilePost(resolve_buf.items);
11381113 },
11391114 else => |err| {
src/Compilation.zig+17-15
......@@ -1278,7 +1278,7 @@ pub const cache_helpers = struct {
12781278 }
12791279
12801280 pub fn hashCSource(self: *Cache.Manifest, c_source: CSourceFile) !void {
1281 _ = try self.addFile(c_source.src_path, null);
1281 _ = try self.addFilePath(.initCwd(c_source.src_path), null);
12821282 // Hash the extra flags, with special care to call addFile for file parameters.
12831283 // TODO this logic can likely be improved by utilizing clang_options_data.zig.
12841284 const file_args = [_][]const u8{"-include"};
......@@ -1289,7 +1289,7 @@ pub const cache_helpers = struct {
12891289 for (file_args) |file_arg| {
12901290 if (mem.eql(u8, file_arg, arg) and arg_i + 1 < c_source.extra_flags.len) {
12911291 arg_i += 1;
1292 _ = try self.addFile(c_source.extra_flags[arg_i], null);
1292 _ = try self.addFilePath(.initCwd(c_source.extra_flags[arg_i]), null);
12931293 }
12941294 }
12951295 }
......@@ -1466,8 +1466,8 @@ pub const CreateOptions = struct {
14661466 stack_report: bool = false,
14671467 link_eh_frame_hdr: bool = false,
14681468 link_emit_relocs: bool = false,
1469 linker_script: ?[]const u8 = null,
1470 version_script: ?[]const u8 = null,
1469 linker_script: ?Cache.Path = null,
1470 version_script: ?Cache.Path = null,
14711471 linker_allow_undefined_version: bool = false,
14721472 linker_enable_new_dtags: ?bool = null,
14731473 soname: ?[]const u8 = null,
......@@ -1546,7 +1546,7 @@ pub const CreateOptions = struct {
15461546 /// (Darwin) Install name of the dylib
15471547 install_name: ?[]const u8 = null,
15481548 /// (Darwin) Path to entitlements file
1549 entitlements: ?[]const u8 = null,
1549 entitlements: ?Cache.Path = null,
15501550 /// (Darwin) size of the __PAGEZERO segment
15511551 pagezero_size: ?u64 = null,
15521552 /// (Darwin) set minimum space for future expansion of the load commands
......@@ -2741,7 +2741,7 @@ pub fn update(comp: *Compilation, main_progress_node: std.Progress.Node) UpdateE
27412741
27422742 // If using the whole caching strategy, we check for *everything* up front, including
27432743 // C source files.
2744 log.debug("Compilation.update for {s}, CacheMode.{s}", .{ comp.root_name, @tagName(comp.cache_use) });
2744 log.debug("Compilation.update for {s}, CacheMode.{t}", .{ comp.root_name, comp.cache_use });
27452745 switch (comp.cache_use) {
27462746 .none => |none| {
27472747 assert(none.tmp_artifact_directory == null);
......@@ -2750,7 +2750,9 @@ pub fn update(comp: *Compilation, main_progress_node: std.Progress.Node) UpdateE
27502750 const tmp_dir_sub_path = "tmp" ++ fs.path.sep_str ++ std.fmt.hex(tmp_dir_rand_int);
27512751 const path = try comp.dirs.local_cache.join(arena, &.{tmp_dir_sub_path});
27522752 const handle = comp.dirs.local_cache.handle.createDirPathOpen(io, tmp_dir_sub_path, .{}) catch |err| {
2753 return comp.setMiscFailure(.open_output, "failed to create output directory '{s}': {t}", .{ path, err });
2753 return comp.setMiscFailure(.open_output, "failed to create output directory {q}: {t}", .{
2754 path, err,
2755 });
27542756 };
27552757 break :d .{ .path = path, .handle = handle };
27562758 };
......@@ -3336,7 +3338,7 @@ fn addNonIncrementalStuffToCacheManifest(
33363338 try link.hashInputs(man, comp.link_inputs);
33373339
33383340 for (comp.c_objects.items) |c_object| {
3339 _ = try man.addFile(c_object.src.src_path, null);
3341 _ = try man.addFilePath(.initCwd(c_object.src.src_path), null);
33403342 man.hash.addOptional(c_object.src.ext);
33413343 man.hash.addListOfBytes(c_object.src.extra_flags);
33423344 }
......@@ -3344,11 +3346,11 @@ fn addNonIncrementalStuffToCacheManifest(
33443346 for (comp.win32_resources.items) |win32_resource| {
33453347 switch (win32_resource.src) {
33463348 .rc => |rc_src| {
3347 _ = try man.addFile(rc_src.src_path, null);
3349 _ = try man.addFilePath(.initCwd(rc_src.src_path), null);
33483350 man.hash.addListOfBytes(rc_src.extra_flags);
33493351 },
33503352 .manifest => |manifest_path| {
3351 _ = try man.addFile(manifest_path, null);
3353 _ = try man.addFilePath(.initCwd(manifest_path), null);
33523354 },
33533355 }
33543356 }
......@@ -3380,8 +3382,8 @@ fn addNonIncrementalStuffToCacheManifest(
33803382
33813383 const opts = comp.cache_use.whole.lf_open_opts;
33823384
3383 try man.addOptionalFile(opts.linker_script);
3384 try man.addOptionalFile(opts.version_script);
3385 try man.addOptionalFilePath(opts.linker_script);
3386 try man.addOptionalFilePath(opts.version_script);
33853387 man.hash.add(opts.allow_undefined_version);
33863388 man.hash.addOptional(opts.enable_new_dtags);
33873389
......@@ -3440,7 +3442,7 @@ fn addNonIncrementalStuffToCacheManifest(
34403442
34413443 // Mach-O specific stuff
34423444 try link.File.MachO.hashAddFrameworks(man, opts.frameworks);
3443 try man.addOptionalFile(opts.entitlements);
3445 try man.addOptionalFilePath(opts.entitlements);
34443446 man.hash.addOptional(opts.pagezero_size);
34453447 man.hash.addOptional(opts.headerpad_size);
34463448 man.hash.add(opts.headerpad_max_install_names);
......@@ -5818,7 +5820,7 @@ fn updateWin32Resource(comp: *Compilation, win32_resource: *Win32Resource, win32
58185820 // the XML data as a RT_MANIFEST resource. This means we can skip preprocessing,
58195821 // include paths, CLI options, etc.
58205822 if (win32_resource.src == .manifest) {
5821 _ = try man.addFile(src_path, null);
5823 _ = try man.addFilePath(.initCwd(src_path), null);
58225824
58235825 const rc_basename = try std.fmt.allocPrint(arena, "{s}.rc", .{src_basename});
58245826 const res_basename = try std.fmt.allocPrint(arena, "{s}.res", .{src_basename});
......@@ -5911,7 +5913,7 @@ fn updateWin32Resource(comp: *Compilation, win32_resource: *Win32Resource, win32
59115913 // We now know that we're compiling an .rc file
59125914 const rc_src = win32_resource.src.rc;
59135915
5914 _ = try man.addFile(rc_src.src_path, null);
5916 _ = try man.addFilePath(.initCwd(rc_src.src_path), null);
59155917 man.hash.addListOfBytes(rc_src.extra_flags);
59165918
59175919 const rc_basename_noext = src_basename[0 .. src_basename.len - fs.path.extension(src_basename).len];
src/libs/freebsd.zig+8-4
......@@ -458,8 +458,10 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) anye
458458 man.hash.add(target.abi);
459459 man.hash.add(target_os_version);
460460
461 const full_abilists_path = try comp.dirs.zig_lib.join(arena, &.{abilists_path});
462 const abilists_index = try man.addFile(full_abilists_path, abilists_max_size);
461 const abilists_index = try man.addFilePath(.{
462 .root_dir = comp.dirs.zig_lib,
463 .sub_path = abilists_path,
464 }, abilists_max_size);
463465
464466 if (try man.hit(prog_node)) {
465467 const digest = man.final();
......@@ -1044,7 +1046,6 @@ fn buildSharedLib(
10441046 const version: Version = .{ .major = sover, .minor = 0, .patch = 0 };
10451047 const ld_basename = path.basename(target.standardDynamicLinkerPath().get().?);
10461048 const soname = if (mem.eql(u8, lib.name, "ld")) ld_basename else basename;
1047 const map_file_path = try path.join(arena, &.{ bin_directory.path.?, all_map_basename });
10481049
10491050 const optimize_mode = comp.compilerRtOptMode();
10501051 const strip = comp.compilerRtStrip();
......@@ -1113,7 +1114,10 @@ fn buildSharedLib(
11131114 .verbose_llvm_cpu_features = comp.verbose_llvm_cpu_features,
11141115 .clang_passthrough_mode = comp.clang_passthrough_mode,
11151116 .version = version,
1116 .version_script = map_file_path,
1117 .version_script = .{
1118 .root_dir = bin_directory,
1119 .sub_path = all_map_basename,
1120 },
11171121 .soname = soname,
11181122 .c_source_files = &c_source_files,
11191123 .skip_linker_dependencies = true,
src/libs/glibc.zig+8-4
......@@ -698,8 +698,10 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) anye
698698 man.hash.add(target.abi);
699699 man.hash.add(target_version);
700700
701 const full_abilists_path = try comp.dirs.zig_lib.join(arena, &.{abilists_path});
702 const abilists_index = try man.addFile(full_abilists_path, abilists_max_size);
701 const abilists_index = try man.addFilePath(.{
702 .root_dir = comp.dirs.zig_lib,
703 .sub_path = abilists_path,
704 }, abilists_max_size);
703705
704706 if (try man.hit(prog_node)) {
705707 const digest = man.final();
......@@ -1188,7 +1190,6 @@ fn buildSharedLib(
11881190 const version: Version = .{ .major = lib.sover, .minor = 0, .patch = 0 };
11891191 const ld_basename = path.basename(comp.getTarget().standardDynamicLinkerPath().get().?);
11901192 const soname = if (mem.eql(u8, lib.name, "ld")) ld_basename else basename;
1191 const map_file_path = try path.join(arena, &.{ bin_directory.path.?, all_map_basename });
11921193
11931194 const optimize_mode = comp.compilerRtOptMode();
11941195 const strip = comp.compilerRtStrip();
......@@ -1257,7 +1258,10 @@ fn buildSharedLib(
12571258 .verbose_llvm_cpu_features = comp.verbose_llvm_cpu_features,
12581259 .clang_passthrough_mode = comp.clang_passthrough_mode,
12591260 .version = version,
1260 .version_script = map_file_path,
1261 .version_script = .{
1262 .root_dir = bin_directory,
1263 .sub_path = all_map_basename,
1264 },
12611265 .soname = soname,
12621266 .c_source_files = &c_source_files,
12631267 .skip_linker_dependencies = true,
src/libs/mingw.zig+17-28
......@@ -243,7 +243,10 @@ pub fn buildImportLib(comp: *Compilation, lib_name: []const u8, prog_node: std.P
243243 var man = cache.obtain();
244244 defer man.deinit();
245245
246 _ = try man.addFile(def_file_path, null);
246 _ = try man.addFilePath(.{
247 .root_dir = comp.dirs.zig_lib,
248 .sub_path = def_file_path,
249 }, null);
247250
248251 const final_lib_basename = try std.fmt.allocPrint(gpa, "{s}.lib", .{lib_name});
249252 errdefer gpa.free(final_lib_basename);
......@@ -384,7 +387,7 @@ pub fn libExists(
384387/// This function body is verbose but all it does is test 3 different paths and
385388/// see if a .def file exists.
386389fn findDef(
387 allocator: Allocator,
390 gpa: Allocator,
388391 io: Io,
389392 target: *const std.Target,
390393 zig_lib_directory: Cache.Directory,
......@@ -398,21 +401,17 @@ fn findDef(
398401 else => unreachable,
399402 };
400403
401 var override_path = std.array_list.Managed(u8).init(allocator);
402 defer override_path.deinit();
404 var override_path: std.ArrayList(u8) = .empty;
405 defer override_path.deinit(gpa);
403406
404407 const s = path.sep_str;
405408
406409 {
407410 // Try the archtecture-specific path first.
408 const fmt_path = "libc" ++ s ++ "mingw" ++ s ++ "{s}" ++ s ++ "{s}.def";
409 if (zig_lib_directory.path) |p| {
410 try override_path.print("{s}" ++ s ++ fmt_path, .{ p, lib_path, lib_name });
411 } else {
412 try override_path.print(fmt_path, .{ lib_path, lib_name });
413 }
414 if (Io.Dir.cwd().access(io, override_path.items, .{})) |_| {
415 return override_path.toOwnedSlice();
411 override_path.shrinkRetainingCapacity(0);
412 try override_path.print(gpa, "libc" ++ s ++ "mingw" ++ s ++ "{s}" ++ s ++ "{s}.def", .{ lib_path, lib_name });
413 if (zig_lib_directory.handle.access(io, override_path.items, .{})) |_| {
414 return override_path.toOwnedSlice(gpa);
416415 } else |err| switch (err) {
417416 error.FileNotFound => {},
418417 else => |e| return e,
......@@ -422,14 +421,9 @@ fn findDef(
422421 {
423422 // Try the generic version.
424423 override_path.shrinkRetainingCapacity(0);
425 const fmt_path = "libc" ++ s ++ "mingw" ++ s ++ "lib-common" ++ s ++ "{s}.def";
426 if (zig_lib_directory.path) |p| {
427 try override_path.print("{s}" ++ s ++ fmt_path, .{ p, lib_name });
428 } else {
429 try override_path.print(fmt_path, .{lib_name});
430 }
431 if (Io.Dir.cwd().access(io, override_path.items, .{})) |_| {
432 return override_path.toOwnedSlice();
424 try override_path.print(gpa, "libc" ++ s ++ "mingw" ++ s ++ "lib-common" ++ s ++ "{s}.def", .{lib_name});
425 if (zig_lib_directory.handle.access(io, override_path.items, .{})) |_| {
426 return override_path.toOwnedSlice(gpa);
433427 } else |err| switch (err) {
434428 error.FileNotFound => {},
435429 else => |e| return e,
......@@ -439,14 +433,9 @@ fn findDef(
439433 {
440434 // Try the generic version and preprocess it.
441435 override_path.shrinkRetainingCapacity(0);
442 const fmt_path = "libc" ++ s ++ "mingw" ++ s ++ "lib-common" ++ s ++ "{s}.def.in";
443 if (zig_lib_directory.path) |p| {
444 try override_path.print("{s}" ++ s ++ fmt_path, .{ p, lib_name });
445 } else {
446 try override_path.print(fmt_path, .{lib_name});
447 }
448 if (Io.Dir.cwd().access(io, override_path.items, .{})) |_| {
449 return override_path.toOwnedSlice();
436 try override_path.print(gpa, "libc" ++ s ++ "mingw" ++ s ++ "lib-common" ++ s ++ "{s}.def.in", .{lib_name});
437 if (zig_lib_directory.handle.access(io, override_path.items, .{})) |_| {
438 return override_path.toOwnedSlice(gpa);
450439 } else |err| switch (err) {
451440 error.FileNotFound => {},
452441 else => |e| return e,
src/libs/netbsd.zig+4-2
......@@ -406,8 +406,10 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) anye
406406 man.hash.add(target.abi);
407407 man.hash.add(target_version);
408408
409 const full_abilists_path = try comp.dirs.zig_lib.join(arena, &.{abilists_path});
410 const abilists_index = try man.addFile(full_abilists_path, abilists_max_size);
409 const abilists_index = try man.addFilePath(.{
410 .root_dir = comp.dirs.zig_lib,
411 .sub_path = abilists_path,
412 }, abilists_max_size);
411413
412414 if (try man.hit(prog_node)) {
413415 const digest = man.final();
src/libs/openbsd.zig+4-2
......@@ -327,8 +327,10 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) anye
327327 man.hash.add(target.abi);
328328 man.hash.add(target_version);
329329
330 const full_abilists_path = try comp.dirs.zig_lib.join(arena, &.{abilists_path});
331 const abilists_index = try man.addFile(full_abilists_path, abilists_max_size);
330 const abilists_index = try man.addFilePath(.{
331 .root_dir = comp.dirs.zig_lib,
332 .sub_path = abilists_path,
333 }, abilists_max_size);
332334
333335 if (try man.hit(prog_node)) {
334336 const digest = man.final();
src/link.zig+3-3
......@@ -461,8 +461,8 @@ pub const File = struct {
461461 allow_undefined_version: bool,
462462 enable_new_dtags: ?bool,
463463 subsystem: ?std.zig.Subsystem,
464 linker_script: ?[]const u8,
465 version_script: ?[]const u8,
464 linker_script: ?Path,
465 version_script: ?Path,
466466 soname: ?[]const u8,
467467 print_gc_sections: bool,
468468 print_icf_sections: bool,
......@@ -493,7 +493,7 @@ pub const File = struct {
493493 /// Install name for the dylib
494494 install_name: ?[]const u8,
495495 /// Path to entitlements file
496 entitlements: ?[]const u8,
496 entitlements: ?Path,
497497 /// size of the __PAGEZERO segment
498498 pagezero_size: ?u64,
499499 /// Set minimum space for future expansion of the load commands
src/link/Lld.zig+4-4
......@@ -75,8 +75,8 @@ pub const Elf = struct {
7575 entry_name: ?[]const u8,
7676 hash_style: HashStyle,
7777 image_base: u64,
78 linker_script: ?[]const u8,
79 version_script: ?[]const u8,
78 linker_script: ?Cache.Path,
79 version_script: ?Cache.Path,
8080 sort_section: ?SortSection,
8181 print_icf_sections: bool,
8282 print_map: bool,
......@@ -930,7 +930,7 @@ fn elfLink(lld: *Lld, arena: Allocator) !void {
930930
931931 if (elf.linker_script) |linker_script| {
932932 try argv.append("-T");
933 try argv.append(linker_script);
933 try argv.append(try linker_script.toString(arena));
934934 }
935935
936936 if (elf.sort_section) |how| {
......@@ -1086,7 +1086,7 @@ fn elfLink(lld: *Lld, arena: Allocator) !void {
10861086 }
10871087 if (elf.version_script) |version_script| {
10881088 try argv.append("-version-script");
1089 try argv.append(version_script);
1089 try argv.append(try version_script.toString(arena));
10901090 }
10911091 if (elf.allow_undefined_version) {
10921092 try argv.append("--undefined-version");
src/link/MachO.zig+2-2
......@@ -127,7 +127,7 @@ frameworks: []const Framework,
127127/// TODO: unify with soname
128128install_name: ?[]const u8,
129129/// Path to entitlements file.
130entitlements: ?[]const u8,
130entitlements: ?Path,
131131compatibility_version: ?std.SemanticVersion,
132132/// Entry name
133133entry_name: ?[]const u8,
......@@ -580,7 +580,7 @@ pub fn flush(
580580 var codesig = CodeSignature.init(self.getPageSize());
581581 codesig.code_directory.ident = fs.path.basename(self.base.emit.sub_path);
582582 if (self.entitlements) |path| codesig.addEntitlements(gpa, io, path) catch |err|
583 return diags.fail("failed to add entitlements from {s}: {t}", .{ path, err });
583 return diags.fail("failed to add entitlements from {f}: {t}", .{ path, err });
584584 try self.writeCodeSignaturePadding(&codesig);
585585 break :blk codesig;
586586 } else null;
src/link/MachO/CodeSignature.zig+2-2
......@@ -246,8 +246,8 @@ pub fn deinit(self: *CodeSignature, allocator: Allocator) void {
246246 }
247247}
248248
249pub fn addEntitlements(self: *CodeSignature, allocator: Allocator, io: Io, path: []const u8) !void {
250 const inner = try Io.Dir.cwd().readFileAlloc(io, path, allocator, .limited(std.math.maxInt(u32)));
249pub fn addEntitlements(self: *CodeSignature, allocator: Allocator, io: Io, path: std.Build.Cache.Path) !void {
250 const inner = try path.root_dir.handle.readFileAlloc(io, path.sub_path, allocator, .limited(std.math.maxInt(u32)));
251251 self.entitlements = .{ .inner = inner };
252252}
253253
src/main.zig+3-3
......@@ -3666,8 +3666,8 @@ fn buildOutputType(
36663666 .want_compiler_rt = if (zig_cc_explicitly_link_compiler_rt) true else want_compiler_rt,
36673667 .want_ubsan_rt = want_ubsan_rt,
36683668 .hash_style = hash_style,
3669 .linker_script = linker_script,
3670 .version_script = version_script,
3669 .linker_script = if (linker_script) |p| .initCwd(p) else null,
3670 .version_script = if (version_script) |p| .initCwd(p) else null,
36713671 .linker_allow_undefined_version = linker_allow_undefined_version,
36723672 .linker_enable_new_dtags = linker_enable_new_dtags,
36733673 .disable_c_depfile = disable_c_depfile,
......@@ -3740,7 +3740,7 @@ fn buildOutputType(
37403740 .debug_incremental = debug_incremental,
37413741 .enable_link_snapshots = enable_link_snapshots,
37423742 .install_name = install_name,
3743 .entitlements = entitlements,
3743 .entitlements = if (entitlements) |p| .initCwd(p) else null,
37443744 .pagezero_size = pagezero_size,
37453745 .headerpad_size = headerpad_size,
37463746 .headerpad_max_install_names = headerpad_max_install_names,