| ... | @@ -356,6 +356,7 @@ fn mainArgs( | ... | @@ -356,6 +356,7 @@ fn mainArgs( |
| 356 | return jitCmd(gpa, arena, io, args, environ_map, .{ | 356 | return jitCmd(gpa, arena, io, args, environ_map, .{ |
| 357 | .cmd_name = "maker", | 357 | .cmd_name = "maker", |
| 358 | .root_src_path = "Maker.zig", | 358 | .root_src_path = "Maker.zig", |
| | 359 | .prepend_cmd = cmd, |
| 359 | .prepend_zig_lib_dir_path = true, | 360 | .prepend_zig_lib_dir_path = true, |
| 360 | .prepend_global_cache_path = true, | 361 | .prepend_global_cache_path = true, |
| 361 | .prepend_zig_exe_path = true, | 362 | .prepend_zig_exe_path = true, |
| ... | @@ -4871,6 +4872,7 @@ pub fn translateC( | ... | @@ -4871,6 +4872,7 @@ pub fn translateC( |
| 4871 | const JitCmdOptions = struct { | 4872 | const JitCmdOptions = struct { |
| 4872 | cmd_name: []const u8, | 4873 | cmd_name: []const u8, |
| 4873 | root_src_path: []const u8, | 4874 | root_src_path: []const u8, |
| | 4875 | prepend_cmd: ?[]const u8 = null, |
| 4874 | prepend_zig_lib_dir_path: bool = false, | 4876 | prepend_zig_lib_dir_path: bool = false, |
| 4875 | prepend_global_cache_path: bool = false, | 4877 | prepend_global_cache_path: bool = false, |
| 4876 | prepend_zig_exe_path: bool = false, | 4878 | prepend_zig_exe_path: bool = false, |
| ... | @@ -4953,7 +4955,7 @@ fn jitCmdInner( | ... | @@ -4953,7 +4955,7 @@ fn jitCmdInner( |
| 4953 | defer dirs.deinit(io); | 4955 | defer dirs.deinit(io); |
| 4954 | | 4956 | |
| 4955 | var child_argv: std.ArrayList([]const u8) = .empty; | 4957 | var child_argv: std.ArrayList([]const u8) = .empty; |
| 4956 | try child_argv.ensureUnusedCapacity(arena, args.len + 5); | 4958 | try child_argv.ensureUnusedCapacity(arena, args.len + 6); |
| 4957 | | 4959 | |
| 4958 | // We want to release all the locks before executing the child process, so we make a nice | 4960 | // We want to release all the locks before executing the child process, so we make a nice |
| 4959 | // big block here to ensure the cleanup gets run when we extract out our argv. | 4961 | // big block here to ensure the cleanup gets run when we extract out our argv. |
| ... | @@ -5054,6 +5056,8 @@ fn jitCmdInner( | ... | @@ -5054,6 +5056,8 @@ fn jitCmdInner( |
| 5054 | child_argv.appendAssumeCapacity(exe_path); | 5056 | child_argv.appendAssumeCapacity(exe_path); |
| 5055 | } | 5057 | } |
| 5056 | | 5058 | |
| | 5059 | if (options.prepend_cmd) |cmd| |
| | 5060 | child_argv.appendAssumeCapacity(cmd); |
| 5057 | if (options.prepend_zig_lib_dir_path) | 5061 | if (options.prepend_zig_lib_dir_path) |
| 5058 | child_argv.appendAssumeCapacity(try allocPrint(arena, "--zig-lib={s}", .{dirs.zig_lib.path.?})); | 5062 | child_argv.appendAssumeCapacity(try allocPrint(arena, "--zig-lib={s}", .{dirs.zig_lib.path.?})); |
| 5059 | if (options.prepend_zig_exe_path) | 5063 | if (options.prepend_zig_exe_path) |