mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
stf: do not call xcode-select or xcrun by absolute path in darwin sdk detection
This commit is contained in:
parent
6a4986b2d6
commit
92b20e4216
@ -15,7 +15,7 @@ pub const macos = @import("darwin/macos.zig");
|
||||
pub fn isSdkInstalled(allocator: Allocator) bool {
|
||||
const result = std.process.Child.run(.{
|
||||
.allocator = allocator,
|
||||
.argv = &.{ "/usr/bin/xcode-select", "--print-path" },
|
||||
.argv = &.{ "xcode-select", "--print-path" },
|
||||
}) catch return false;
|
||||
|
||||
defer {
|
||||
@ -48,7 +48,7 @@ pub fn getSdk(allocator: Allocator, target: Target) ?[]const u8 {
|
||||
.visionos => if (is_simulator_abi) "xrsimulator" else "xros",
|
||||
else => return null,
|
||||
};
|
||||
const argv = &[_][]const u8{ "/usr/bin/xcrun", "--sdk", sdk, "--show-sdk-path" };
|
||||
const argv = &[_][]const u8{ "xcrun", "--sdk", sdk, "--show-sdk-path" };
|
||||
const result = std.process.Child.run(.{ .allocator = allocator, .argv = argv }) catch return null;
|
||||
defer {
|
||||
allocator.free(result.stderr);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user