diff --git a/Tools/Sources/BuildSDK.swift b/Tools/Sources/BuildSDK.swift index 51d9abca08..211a34efeb 100644 --- a/Tools/Sources/BuildSDK.swift +++ b/Tools/Sources/BuildSDK.swift @@ -91,7 +91,8 @@ struct BuildSDK: ParsableCommand { /// Build the Rust SDK as an XCFramework with the debug profile. func buildFramework() throws { - var buildCommand = "cargo xtask swift build-framework" + // unset fixes an issue where swift compilation prevents building for targets other than macOS X + var buildCommand = "unset SDKROOT && cargo xtask swift build-framework" buildCommand.append(" --profile \(profile.rawValue)") if let target { buildCommand.append(" --only-target \(target.rawValue)")