| author | |
| committer | |
| log | 85fe35d246d0076d403fc5ee90f4434da7206fd5 |
| tree | 611e789c83a8257d8f8b0b0c5a8f860e783e4d36 |
| parent | f28802a9c6c3bd36368101981243aab7cf4f453f |
11 files changed, 67 insertions(+), 54 deletions(-)
lib/std/Io/Threaded.zig-11| ... | @@ -14279,17 +14279,6 @@ fn testArgvToCommandLineWindows(argv: []const []const u8, expected_cmd_line: []c | ... | @@ -14279,17 +14279,6 @@ fn testArgvToCommandLineWindows(argv: []const []const u8, expected_cmd_line: []c |
| 14279 | try std.testing.expectEqualStrings(expected_cmd_line, cmd_line); | 14279 | try std.testing.expectEqualStrings(expected_cmd_line, cmd_line); |
| 14280 | } | 14280 | } |
| 14281 | 14281 | ||
| 14282 | /// Replaces the current process image with the executed process. If this | ||
| 14283 | /// function succeeds, it does not return. | ||
| 14284 | /// | ||
| 14285 | /// This operation is not available on all targets. `can_execv` | ||
| 14286 | /// | ||
| 14287 | /// This function also uses the PATH environment variable to get the full path to the executable. | ||
| 14288 | /// If `file` is an absolute path, this is the same as `execveZ`. | ||
| 14289 | /// | ||
| 14290 | /// Like `execvpeZ` except if `arg0_expand` is `.expand`, then `argv` is mutable, | ||
| 14291 | /// and `argv[0]` is expanded to be the same absolute path that is passed to the execve syscall. | ||
| 14292 | /// If this function returns with an error, `argv[0]` will be restored to the value it was when it was passed in. | ||
| 14293 | fn execvpeZ_expandArg0( | 14282 | fn execvpeZ_expandArg0( |
| 14294 | arg0_expand: process.ArgExpansion, | 14283 | arg0_expand: process.ArgExpansion, |
| 14295 | file: [*:0]const u8, | 14284 | file: [*:0]const u8, |
src/Compilation.zig+53-40| ... | @@ -54,7 +54,7 @@ gpa: Allocator, | ... | @@ -54,7 +54,7 @@ gpa: Allocator, |
| 54 | /// threads at once. | 54 | /// threads at once. |
| 55 | arena: Allocator, | 55 | arena: Allocator, |
| 56 | io: Io, | 56 | io: Io, |
| 57 | environ_map: *std.process.Environ.Map, | 57 | environ_map: *const std.process.Environ.Map, |
| 58 | thread_limit: usize, | 58 | thread_limit: usize, |
| 59 | /// Not every Compilation compiles .zig code! For example you could do `zig build-exe foo.o`. | 59 | /// Not every Compilation compiles .zig code! For example you could do `zig build-exe foo.o`. |
| 60 | zcu: ?*Zcu, | 60 | zcu: ?*Zcu, |
| ... | @@ -762,12 +762,12 @@ pub const Directories = struct { | ... | @@ -762,12 +762,12 @@ pub const Directories = struct { |
| 762 | .wasi => void, | 762 | .wasi => void, |
| 763 | else => []const u8, | 763 | else => []const u8, |
| 764 | }, | 764 | }, |
| 765 | env_map: *std.process.Environ.Map, | 765 | env_map: *const std.process.Environ.Map, |
| 766 | ) Directories { | 766 | ) Directories { |
| 767 | const wasi = builtin.target.os.tag == .wasi; | 767 | const wasi = builtin.target.os.tag == .wasi; |
| 768 | 768 | ||
| 769 | const cwd = introspect.getResolvedCwd(arena) catch |err| { | 769 | const cwd = introspect.getResolvedCwd(arena) catch |err| { |
| 770 | fatal("unable to get cwd: {s}", .{@errorName(err)}); | 770 | fatal("unable to get cwd: {t}", .{err}); |
| 771 | }; | 771 | }; |
| 772 | 772 | ||
| 773 | const zig_lib: Cache.Directory = d: { | 773 | const zig_lib: Cache.Directory = d: { |
| ... | @@ -1799,7 +1799,7 @@ pub const CreateOptions = struct { | ... | @@ -1799,7 +1799,7 @@ pub const CreateOptions = struct { |
| 1799 | 1799 | ||
| 1800 | parent_whole_cache: ?ParentWholeCache = null, | 1800 | parent_whole_cache: ?ParentWholeCache = null, |
| 1801 | 1801 | ||
| 1802 | environ_map: *std.process.Environ.Map, | 1802 | environ_map: *const std.process.Environ.Map, |
| 1803 | 1803 | ||
| 1804 | pub const Entry = link.File.OpenOptions.Entry; | 1804 | pub const Entry = link.File.OpenOptions.Entry; |
| 1805 | 1805 | ||
| ... | @@ -5713,7 +5713,7 @@ pub fn translateC( | ... | @@ -5713,7 +5713,7 @@ pub fn translateC( |
| 5713 | translated_basename: []const u8, | 5713 | translated_basename: []const u8, |
| 5714 | owner_mod: *Package.Module, | 5714 | owner_mod: *Package.Module, |
| 5715 | prog_node: std.Progress.Node, | 5715 | prog_node: std.Progress.Node, |
| 5716 | env_map: *std.process.Environ.Map, | 5716 | env_map: *const std.process.Environ.Map, |
| 5717 | ) !CImportResult { | 5717 | ) !CImportResult { |
| 5718 | dev.check(.translate_c_command); | 5718 | dev.check(.translate_c_command); |
| 5719 | 5719 | ||
| ... | @@ -6260,7 +6260,7 @@ fn updateCObject(comp: *Compilation, c_object: *CObject, c_obj_prog_node: std.Pr | ... | @@ -6260,7 +6260,7 @@ fn updateCObject(comp: *Compilation, c_object: *CObject, c_obj_prog_node: std.Pr |
| 6260 | // that we could "tail call" clang by doing an execve, and any use of | 6260 | // that we could "tail call" clang by doing an execve, and any use of |
| 6261 | // the caching system would actually be problematic since the user is | 6261 | // the caching system would actually be problematic since the user is |
| 6262 | // presumably doing their own caching by using dep file flags. | 6262 | // presumably doing their own caching by using dep file flags. |
| 6263 | if (std.process.can_execv and direct_o and | 6263 | if (std.process.can_replace and direct_o and |
| 6264 | comp.disable_c_depfile and comp.clang_passthrough_mode) | 6264 | comp.disable_c_depfile and comp.clang_passthrough_mode) |
| 6265 | { | 6265 | { |
| 6266 | try comp.addCCArgs(arena, &argv, ext, null, c_object.src.owner); | 6266 | try comp.addCCArgs(arena, &argv, ext, null, c_object.src.owner); |
| ... | @@ -6292,8 +6292,8 @@ fn updateCObject(comp: *Compilation, c_object: *CObject, c_obj_prog_node: std.Pr | ... | @@ -6292,8 +6292,8 @@ fn updateCObject(comp: *Compilation, c_object: *CObject, c_obj_prog_node: std.Pr |
| 6292 | try dumpArgv(io, argv.items); | 6292 | try dumpArgv(io, argv.items); |
| 6293 | } | 6293 | } |
| 6294 | 6294 | ||
| 6295 | const err = std.process.execv(arena, argv.items); | 6295 | const err = std.process.replace(io, .{ .argv = argv.items }); |
| 6296 | fatal("unable to execv clang: {s}", .{@errorName(err)}); | 6296 | fatal("unable to replace process with clang: {t}", .{err}); |
| 6297 | } | 6297 | } |
| 6298 | 6298 | ||
| 6299 | // We can't know the digest until we do the C compiler invocation, | 6299 | // We can't know the digest until we do the C compiler invocation, |
| ... | @@ -6348,14 +6348,21 @@ fn updateCObject(comp: *Compilation, c_object: *CObject, c_obj_prog_node: std.Pr | ... | @@ -6348,14 +6348,21 @@ fn updateCObject(comp: *Compilation, c_object: *CObject, c_obj_prog_node: std.Pr |
| 6348 | else => log.warn("failed to delete '{s}': {s}", .{ dep_file_path, @errorName(err) }), | 6348 | else => log.warn("failed to delete '{s}': {s}", .{ dep_file_path, @errorName(err) }), |
| 6349 | }; | 6349 | }; |
| 6350 | if (std.process.can_spawn) { | 6350 | if (std.process.can_spawn) { |
| 6351 | var child = std.process.Child.init(argv.items, arena); | ||
| 6352 | if (comp.clang_passthrough_mode) { | 6351 | if (comp.clang_passthrough_mode) { |
| 6353 | child.stdin_behavior = .inherit; | 6352 | var child = std.process.spawn(io, .{ |
| 6354 | child.stdout_behavior = .inherit; | 6353 | .argv = argv.items, |
| 6355 | child.stderr_behavior = .inherit; | 6354 | .stdin = .inherit, |
| 6356 | 6355 | .stdout = .inherit, | |
| 6357 | const term = child.spawnAndWait(io) catch |err| { | 6356 | .stderr = .inherit, |
| 6358 | return comp.failCObj(c_object, "failed to spawn zig clang (passthrough mode) {s}: {s}", .{ argv.items[0], @errorName(err) }); | 6357 | }) catch |err| { |
| 6358 | return comp.failCObj(c_object, "failed to spawn zig clang (passthrough mode) {s}: {t}", .{ | ||
| 6359 | argv.items[0], err, | ||
| 6360 | }); | ||
| 6361 | }; | ||
| 6362 | const term = child.wait(io) catch |err| { | ||
| 6363 | return comp.failCObj(c_object, "failed to wait zig clang (passthrough mode) {s}: {t}", .{ | ||
| 6364 | argv.items[0], err, | ||
| 6365 | }); | ||
| 6359 | }; | 6366 | }; |
| 6360 | switch (term) { | 6367 | switch (term) { |
| 6361 | .exited => |code| { | 6368 | .exited => |code| { |
| ... | @@ -6367,36 +6374,41 @@ fn updateCObject(comp: *Compilation, c_object: *CObject, c_obj_prog_node: std.Pr | ... | @@ -6367,36 +6374,41 @@ fn updateCObject(comp: *Compilation, c_object: *CObject, c_obj_prog_node: std.Pr |
| 6367 | }, | 6374 | }, |
| 6368 | else => std.process.abort(), | 6375 | else => std.process.abort(), |
| 6369 | } | 6376 | } |
| 6370 | } else { | 6377 | unreachable; |
| 6371 | child.stdin_behavior = .ignore; | 6378 | } |
| 6372 | child.stdout_behavior = .ignore; | ||
| 6373 | child.stderr_behavior = .pipe; | ||
| 6374 | 6379 | ||
| 6375 | try child.spawn(io); | 6380 | var child = try std.process.spawn(io, .{ |
| 6381 | .argv = argv.items, | ||
| 6382 | .stdin = .ignore, | ||
| 6383 | .stdout = .ignore, | ||
| 6384 | .stderr = .pipe, | ||
| 6385 | }); | ||
| 6376 | 6386 | ||
| 6377 | var stderr_reader = child.stderr.?.readerStreaming(io, &.{}); | 6387 | var stderr_reader = child.stderr.?.readerStreaming(io, &.{}); |
| 6378 | const stderr = try stderr_reader.interface.allocRemaining(arena, .limited(std.math.maxInt(u32))); | 6388 | const stderr = try stderr_reader.interface.allocRemaining(arena, .limited(std.math.maxInt(u32))); |
| 6379 | 6389 | ||
| 6380 | const term = child.wait(io) catch |err| { | 6390 | const term = child.wait(io) catch |err| |
| 6381 | return comp.failCObj(c_object, "failed to spawn zig clang {s}: {s}", .{ argv.items[0], @errorName(err) }); | 6391 | return comp.failCObj(c_object, "failed to spawn zig clang {s}: {t}", .{ argv.items[0], err }); |
| 6382 | }; | ||
| 6383 | 6392 | ||
| 6384 | switch (term) { | 6393 | switch (term) { |
| 6385 | .exited => |code| if (code != 0) if (out_diag_path) |diag_file_path| { | 6394 | .exited => |code| if (code != 0) if (out_diag_path) |diag_file_path| { |
| 6386 | const bundle = CObject.Diag.Bundle.parse(gpa, io, diag_file_path) catch |err| { | 6395 | const bundle = CObject.Diag.Bundle.parse(gpa, io, diag_file_path) catch |err| { |
| 6387 | log.err("{}: failed to parse clang diagnostics: {s}", .{ err, stderr }); | 6396 | log.err("{}: failed to parse clang diagnostics: {s}", .{ err, stderr }); |
| 6388 | return comp.failCObj(c_object, "clang exited with code {d}", .{code}); | ||
| 6389 | }; | ||
| 6390 | return comp.failCObjWithOwnedDiagBundle(c_object, bundle); | ||
| 6391 | } else { | ||
| 6392 | log.err("clang failed with stderr: {s}", .{stderr}); | ||
| 6393 | return comp.failCObj(c_object, "clang exited with code {d}", .{code}); | 6397 | return comp.failCObj(c_object, "clang exited with code {d}", .{code}); |
| 6394 | }, | 6398 | }; |
| 6395 | else => { | 6399 | return comp.failCObjWithOwnedDiagBundle(c_object, bundle); |
| 6396 | log.err("clang terminated with stderr: {s}", .{stderr}); | 6400 | } else { |
| 6397 | return comp.failCObj(c_object, "clang terminated unexpectedly", .{}); | 6401 | log.err("clang failed with stderr: {s}", .{stderr}); |
| 6398 | }, | 6402 | return comp.failCObj(c_object, "clang exited with code {d}", .{code}); |
| 6399 | } | 6403 | }, |
| 6404 | .signal => |sig| { | ||
| 6405 | log.err("clang failed with stderr: {s}", .{stderr}); | ||
| 6406 | return comp.failCObj(c_object, "clang terminated with signal {t}", .{sig}); | ||
| 6407 | }, | ||
| 6408 | else => { | ||
| 6409 | log.err("clang terminated with stderr: {s}", .{stderr}); | ||
| 6410 | return comp.failCObj(c_object, "clang terminated unexpectedly", .{}); | ||
| 6411 | }, | ||
| 6400 | } | 6412 | } |
| 6401 | } else { | 6413 | } else { |
| 6402 | const exit_code = try clangMain(arena, argv.items); | 6414 | const exit_code = try clangMain(arena, argv.items); |
| ... | @@ -8113,6 +8125,7 @@ pub fn build_crt_file( | ... | @@ -8113,6 +8125,7 @@ pub fn build_crt_file( |
| 8113 | .verbose_llvm_cpu_features = comp.verbose_llvm_cpu_features, | 8125 | .verbose_llvm_cpu_features = comp.verbose_llvm_cpu_features, |
| 8114 | .clang_passthrough_mode = comp.clang_passthrough_mode, | 8126 | .clang_passthrough_mode = comp.clang_passthrough_mode, |
| 8115 | .skip_linker_dependencies = true, | 8127 | .skip_linker_dependencies = true, |
| 8128 | .environ_map = comp.environ_map, | ||
| 8116 | }) catch |err| switch (err) { | 8129 | }) catch |err| switch (err) { |
| 8117 | error.CreateFail => { | 8130 | error.CreateFail => { |
| 8118 | comp.lockAndSetMiscFailure(misc_task_tag, "sub-compilation of {t} failed: {f}", .{ misc_task_tag, sub_create_diag }); | 8131 | comp.lockAndSetMiscFailure(misc_task_tag, "sub-compilation of {t} failed: {f}", .{ misc_task_tag, sub_create_diag }); |
src/introspect.zig+1-1| ... | @@ -102,7 +102,7 @@ pub fn findZigLibDirFromSelfExe( | ... | @@ -102,7 +102,7 @@ pub fn findZigLibDirFromSelfExe( |
| 102 | return error.FileNotFound; | 102 | return error.FileNotFound; |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | pub fn resolveGlobalCacheDir(arena: Allocator, env_map: *std.process.Environ.Map) ![]const u8 { | 105 | pub fn resolveGlobalCacheDir(arena: Allocator, env_map: *const std.process.Environ.Map) ![]const u8 { |
| 106 | if (std.zig.EnvVar.ZIG_GLOBAL_CACHE_DIR.get(env_map)) |value| return value; | 106 | if (std.zig.EnvVar.ZIG_GLOBAL_CACHE_DIR.get(env_map)) |value| return value; |
| 107 | 107 | ||
| 108 | const app_name = "zig"; | 108 | const app_name = "zig"; |
src/libs/freebsd.zig+2| ... | @@ -445,6 +445,7 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) anye | ... | @@ -445,6 +445,7 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) anye |
| 445 | .gpa = gpa, | 445 | .gpa = gpa, |
| 446 | .io = io, | 446 | .io = io, |
| 447 | .manifest_dir = try comp.dirs.global_cache.handle.createDirPathOpen(io, "h", .{}), | 447 | .manifest_dir = try comp.dirs.global_cache.handle.createDirPathOpen(io, "h", .{}), |
| 448 | .cwd = comp.dirs.cwd, | ||
| 448 | }; | 449 | }; |
| 449 | cache.addPrefix(.{ .path = null, .handle = Io.Dir.cwd() }); | 450 | cache.addPrefix(.{ .path = null, .handle = Io.Dir.cwd() }); |
| 450 | cache.addPrefix(comp.dirs.zig_lib); | 451 | cache.addPrefix(comp.dirs.zig_lib); |
| ... | @@ -1119,6 +1120,7 @@ fn buildSharedLib( | ... | @@ -1119,6 +1120,7 @@ fn buildSharedLib( |
| 1119 | .soname = soname, | 1120 | .soname = soname, |
| 1120 | .c_source_files = &c_source_files, | 1121 | .c_source_files = &c_source_files, |
| 1121 | .skip_linker_dependencies = true, | 1122 | .skip_linker_dependencies = true, |
| 1123 | .environ_map = comp.environ_map, | ||
| 1122 | }) catch |err| switch (err) { | 1124 | }) catch |err| switch (err) { |
| 1123 | error.CreateFail => { | 1125 | error.CreateFail => { |
| 1124 | comp.lockAndSetMiscFailure(misc_task, "sub-compilation of {t} failed: {f}", .{ misc_task, sub_create_diag }); | 1126 | comp.lockAndSetMiscFailure(misc_task, "sub-compilation of {t} failed: {f}", .{ misc_task, sub_create_diag }); |
src/libs/glibc.zig+2| ... | @@ -680,6 +680,7 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) anye | ... | @@ -680,6 +680,7 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) anye |
| 680 | .gpa = gpa, | 680 | .gpa = gpa, |
| 681 | .io = io, | 681 | .io = io, |
| 682 | .manifest_dir = try comp.dirs.global_cache.handle.createDirPathOpen(io, "h", .{}), | 682 | .manifest_dir = try comp.dirs.global_cache.handle.createDirPathOpen(io, "h", .{}), |
| 683 | .cwd = comp.dirs.cwd, | ||
| 683 | }; | 684 | }; |
| 684 | cache.addPrefix(.{ .path = null, .handle = Io.Dir.cwd() }); | 685 | cache.addPrefix(.{ .path = null, .handle = Io.Dir.cwd() }); |
| 685 | cache.addPrefix(comp.dirs.zig_lib); | 686 | cache.addPrefix(comp.dirs.zig_lib); |
| ... | @@ -1258,6 +1259,7 @@ fn buildSharedLib( | ... | @@ -1258,6 +1259,7 @@ fn buildSharedLib( |
| 1258 | .soname = soname, | 1259 | .soname = soname, |
| 1259 | .c_source_files = &c_source_files, | 1260 | .c_source_files = &c_source_files, |
| 1260 | .skip_linker_dependencies = true, | 1261 | .skip_linker_dependencies = true, |
| 1262 | .environ_map = comp.environ_map, | ||
| 1261 | }) catch |err| switch (err) { | 1263 | }) catch |err| switch (err) { |
| 1262 | error.CreateFail => { | 1264 | error.CreateFail => { |
| 1263 | comp.lockAndSetMiscFailure(misc_task, "sub-compilation of {t} failed: {f}", .{ misc_task, sub_create_diag }); | 1265 | comp.lockAndSetMiscFailure(misc_task, "sub-compilation of {t} failed: {f}", .{ misc_task, sub_create_diag }); |
src/libs/libcxx.zig+2| ... | @@ -275,6 +275,7 @@ pub fn buildLibCxx(comp: *Compilation, prog_node: std.Progress.Node) BuildError! | ... | @@ -275,6 +275,7 @@ pub fn buildLibCxx(comp: *Compilation, prog_node: std.Progress.Node) BuildError! |
| 275 | .verbose_llvm_cpu_features = comp.verbose_llvm_cpu_features, | 275 | .verbose_llvm_cpu_features = comp.verbose_llvm_cpu_features, |
| 276 | .clang_passthrough_mode = comp.clang_passthrough_mode, | 276 | .clang_passthrough_mode = comp.clang_passthrough_mode, |
| 277 | .skip_linker_dependencies = true, | 277 | .skip_linker_dependencies = true, |
| 278 | .environ_map = comp.environ_map, | ||
| 278 | }) catch |err| { | 279 | }) catch |err| { |
| 279 | switch (err) { | 280 | switch (err) { |
| 280 | else => comp.lockAndSetMiscFailure(misc_task, "unable to build libc++: create compilation failed: {t}", .{err}), | 281 | else => comp.lockAndSetMiscFailure(misc_task, "unable to build libc++: create compilation failed: {t}", .{err}), |
| ... | @@ -468,6 +469,7 @@ pub fn buildLibCxxAbi(comp: *Compilation, prog_node: std.Progress.Node) BuildErr | ... | @@ -468,6 +469,7 @@ pub fn buildLibCxxAbi(comp: *Compilation, prog_node: std.Progress.Node) BuildErr |
| 468 | .verbose_llvm_cpu_features = comp.verbose_llvm_cpu_features, | 469 | .verbose_llvm_cpu_features = comp.verbose_llvm_cpu_features, |
| 469 | .clang_passthrough_mode = comp.clang_passthrough_mode, | 470 | .clang_passthrough_mode = comp.clang_passthrough_mode, |
| 470 | .skip_linker_dependencies = true, | 471 | .skip_linker_dependencies = true, |
| 472 | .environ_map = comp.environ_map, | ||
| 471 | }) catch |err| { | 473 | }) catch |err| { |
| 472 | switch (err) { | 474 | switch (err) { |
| 473 | else => comp.lockAndSetMiscFailure(misc_task, "unable to build libc++abi: create compilation failed: {t}", .{err}), | 475 | else => comp.lockAndSetMiscFailure(misc_task, "unable to build libc++abi: create compilation failed: {t}", .{err}), |
src/libs/libtsan.zig+1| ... | @@ -301,6 +301,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo | ... | @@ -301,6 +301,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo |
| 301 | .linker_allow_shlib_undefined = linker_allow_shlib_undefined, | 301 | .linker_allow_shlib_undefined = linker_allow_shlib_undefined, |
| 302 | .install_name = install_name, | 302 | .install_name = install_name, |
| 303 | .headerpad_size = headerpad_size, | 303 | .headerpad_size = headerpad_size, |
| 304 | .environ_map = comp.environ_map, | ||
| 304 | }) catch |err| { | 305 | }) catch |err| { |
| 305 | switch (err) { | 306 | switch (err) { |
| 306 | else => comp.lockAndSetMiscFailure(misc_task, "unable to build {t}: create compilation failed: {t}", .{ misc_task, err }), | 307 | else => comp.lockAndSetMiscFailure(misc_task, "unable to build {t}: create compilation failed: {t}", .{ misc_task, err }), |
src/libs/libunwind.zig+1| ... | @@ -166,6 +166,7 @@ pub fn buildStaticLib(comp: *Compilation, prog_node: std.Progress.Node) BuildErr | ... | @@ -166,6 +166,7 @@ pub fn buildStaticLib(comp: *Compilation, prog_node: std.Progress.Node) BuildErr |
| 166 | .verbose_llvm_cpu_features = comp.verbose_llvm_cpu_features, | 166 | .verbose_llvm_cpu_features = comp.verbose_llvm_cpu_features, |
| 167 | .clang_passthrough_mode = comp.clang_passthrough_mode, | 167 | .clang_passthrough_mode = comp.clang_passthrough_mode, |
| 168 | .skip_linker_dependencies = true, | 168 | .skip_linker_dependencies = true, |
| 169 | .environ_map = comp.environ_map, | ||
| 169 | }) catch |err| { | 170 | }) catch |err| { |
| 170 | switch (err) { | 171 | switch (err) { |
| 171 | else => comp.lockAndSetMiscFailure(misc_task, "unable to build {t}: create compilation failed: {t}", .{ misc_task, err }), | 172 | else => comp.lockAndSetMiscFailure(misc_task, "unable to build {t}: create compilation failed: {t}", .{ misc_task, err }), |
src/libs/musl.zig+1| ... | @@ -272,6 +272,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro | ... | @@ -272,6 +272,7 @@ pub fn buildCrtFile(comp: *Compilation, in_crt_file: CrtFile, prog_node: std.Pro |
| 272 | }, | 272 | }, |
| 273 | .skip_linker_dependencies = true, | 273 | .skip_linker_dependencies = true, |
| 274 | .soname = "libc.so", | 274 | .soname = "libc.so", |
| 275 | .environ_map = comp.environ_map, | ||
| 275 | }) catch |err| switch (err) { | 276 | }) catch |err| switch (err) { |
| 276 | error.CreateFail => { | 277 | error.CreateFail => { |
| 277 | comp.lockAndSetMiscFailure(misc_task, "sub-compilation of {t} failed: {f}", .{ misc_task, sub_create_diag }); | 278 | comp.lockAndSetMiscFailure(misc_task, "sub-compilation of {t} failed: {f}", .{ misc_task, sub_create_diag }); |
src/libs/netbsd.zig+2| ... | @@ -386,6 +386,7 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) anye | ... | @@ -386,6 +386,7 @@ pub fn buildSharedObjects(comp: *Compilation, prog_node: std.Progress.Node) anye |
| 386 | .gpa = gpa, | 386 | .gpa = gpa, |
| 387 | .io = io, | 387 | .io = io, |
| 388 | .manifest_dir = try comp.dirs.global_cache.handle.createDirPathOpen(io, "h", .{}), | 388 | .manifest_dir = try comp.dirs.global_cache.handle.createDirPathOpen(io, "h", .{}), |
| 389 | .cwd = comp.dirs.cwd, | ||
| 389 | }; | 390 | }; |
| 390 | cache.addPrefix(.{ .path = null, .handle = Io.Dir.cwd() }); | 391 | cache.addPrefix(.{ .path = null, .handle = Io.Dir.cwd() }); |
| 391 | cache.addPrefix(comp.dirs.zig_lib); | 392 | cache.addPrefix(comp.dirs.zig_lib); |
| ... | @@ -761,6 +762,7 @@ fn buildSharedLib( | ... | @@ -761,6 +762,7 @@ fn buildSharedLib( |
| 761 | .soname = soname, | 762 | .soname = soname, |
| 762 | .c_source_files = &c_source_files, | 763 | .c_source_files = &c_source_files, |
| 763 | .skip_linker_dependencies = true, | 764 | .skip_linker_dependencies = true, |
| 765 | .environ_map = comp.environ_map, | ||
| 764 | }) catch |err| switch (err) { | 766 | }) catch |err| switch (err) { |
| 765 | error.CreateFail => { | 767 | error.CreateFail => { |
| 766 | comp.lockAndSetMiscFailure(misc_task, "sub-compilation of {t} failed: {f}", .{ misc_task, sub_create_diag }); | 768 | comp.lockAndSetMiscFailure(misc_task, "sub-compilation of {t} failed: {f}", .{ misc_task, sub_create_diag }); |
src/main.zig+2-2| ... | @@ -4708,7 +4708,7 @@ pub fn translateC( | ... | @@ -4708,7 +4708,7 @@ pub fn translateC( |
| 4708 | arena: Allocator, | 4708 | arena: Allocator, |
| 4709 | io: Io, | 4709 | io: Io, |
| 4710 | argv: []const []const u8, | 4710 | argv: []const []const u8, |
| 4711 | env_map: *process.Environ.Map, | 4711 | env_map: *const process.Environ.Map, |
| 4712 | prog_node: std.Progress.Node, | 4712 | prog_node: std.Progress.Node, |
| 4713 | capture: ?*[]u8, | 4713 | capture: ?*[]u8, |
| 4714 | ) !void { | 4714 | ) !void { |
| ... | @@ -5516,7 +5516,7 @@ fn jitCmd( | ... | @@ -5516,7 +5516,7 @@ fn jitCmd( |
| 5516 | arena: Allocator, | 5516 | arena: Allocator, |
| 5517 | io: Io, | 5517 | io: Io, |
| 5518 | args: []const []const u8, | 5518 | args: []const []const u8, |
| 5519 | env_map: *process.Environ.Map, | 5519 | env_map: *const process.Environ.Map, |
| 5520 | options: JitCmdOptions, | 5520 | options: JitCmdOptions, |
| 5521 | ) !void { | 5521 | ) !void { |
| 5522 | dev.check(.jit_command); | 5522 | dev.check(.jit_command); |