mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
std.zig.system.darwin: Add driverkit handling in getSdk().
This commit is contained in:
parent
e528ab4709
commit
7843deb16b
@ -37,15 +37,16 @@ pub fn isSdkInstalled(allocator: Allocator) bool {
|
||||
pub fn getSdk(allocator: Allocator, target: Target) ?[]const u8 {
|
||||
const is_simulator_abi = target.abi == .simulator;
|
||||
const sdk = switch (target.os.tag) {
|
||||
.macos => "macosx",
|
||||
.ios => switch (target.abi) {
|
||||
.simulator => "iphonesimulator",
|
||||
.macabi => "macosx",
|
||||
.simulator => "iphonesimulator",
|
||||
else => "iphoneos",
|
||||
},
|
||||
.watchos => if (is_simulator_abi) "watchsimulator" else "watchos",
|
||||
.driverkit => "driverkit",
|
||||
.macos => "macosx",
|
||||
.tvos => if (is_simulator_abi) "appletvsimulator" else "appletvos",
|
||||
.visionos => if (is_simulator_abi) "xrsimulator" else "xros",
|
||||
.watchos => if (is_simulator_abi) "watchsimulator" else "watchos",
|
||||
else => return null,
|
||||
};
|
||||
const argv = &[_][]const u8{ "xcrun", "--sdk", sdk, "--show-sdk-path" };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user