| ... | @@ -44,7 +44,7 @@ pub fn main(init: std.process.Init.Minimal) !void { | ... | @@ -44,7 +44,7 @@ pub fn main(init: std.process.Init.Minimal) !void { |
| 44 | try renderErrorMessage(stderr.terminal(), .err, "expected zig lib dir as first argument", .{}); | 44 | try renderErrorMessage(stderr.terminal(), .err, "expected zig lib dir as first argument", .{}); |
| 45 | std.process.exit(1); | 45 | std.process.exit(1); |
| 46 | } | 46 | } |
| 47 | const zig_lib_dir = args[1]; | 47 | const zig_lib_dir = std.mem.cutPrefix(u8, args[1], "--zig-lib=") orelse @panic("bad --zig-lib= arg"); |
| 48 | var cli_args = args[2..]; | 48 | var cli_args = args[2..]; |
| 49 | | 49 | |
| 50 | var zig_integration = false; | 50 | var zig_integration = false; |
| ... | @@ -639,7 +639,7 @@ fn getIncludePaths( | ... | @@ -639,7 +639,7 @@ fn getIncludePaths( |
| 639 | }; | 639 | }; |
| 640 | const target = std.zig.resolveTargetQueryOrFatal(io, target_query); | 640 | const target = std.zig.resolveTargetQueryOrFatal(io, target_query); |
| 641 | const is_native_abi = target_query.isNativeAbi(); | 641 | const is_native_abi = target_query.isNativeAbi(); |
| 642 | const detected_libc = std.zig.LibCDirs.detect(arena, io, .{ .root_dir = .cwd, .sub_path = zig_lib_dir }, &target, is_native_abi, true, null, environ_map) catch { | 642 | const detected_libc = std.zig.LibCDirs.detect(arena, io, .{ .root_dir = .cwd(), .sub_path = zig_lib_dir }, &target, is_native_abi, true, null, environ_map) catch { |
| 643 | if (includes == .any) { | 643 | if (includes == .any) { |
| 644 | // fall back to mingw | 644 | // fall back to mingw |
| 645 | includes = .gnu; | 645 | includes = .gnu; |
| ... | @@ -668,7 +668,7 @@ fn getIncludePaths( | ... | @@ -668,7 +668,7 @@ fn getIncludePaths( |
| 668 | const detected_libc = std.zig.LibCDirs.detect( | 668 | const detected_libc = std.zig.LibCDirs.detect( |
| 669 | arena, | 669 | arena, |
| 670 | io, | 670 | io, |
| 671 | .{ .root_dir = .cwd, .sub_path = zig_lib_dir }, | 671 | .{ .root_dir = .cwd(), .sub_path = zig_lib_dir }, |
| 672 | &target, | 672 | &target, |
| 673 | is_native_abi, | 673 | is_native_abi, |
| 674 | true, | 674 | true, |