From 0f358a6b2d79ed1e89538b13723bcf4318249774 Mon Sep 17 00:00:00 2001 From: Mauro <34335419+Velin92@users.noreply.github.com> Date: Mon, 12 Jun 2023 11:11:53 +0200 Subject: [PATCH] buildSDK.sh script, build the sdk without encountering target problems (#1063) * Script that allows to build the sdk without any issue * target independent solution * Update CONTRIBUTING.md * better more scalable solution * Revert "Update CONTRIBUTING.md" This reverts commit 5cc20019ad4277f5745f32eb9472e21bdb6f2160. * Update Tools/Sources/BuildSDK.swift Co-authored-by: Stefan Ceriu --------- Co-authored-by: Stefan Ceriu --- Tools/Sources/BuildSDK.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tools/Sources/BuildSDK.swift b/Tools/Sources/BuildSDK.swift index 51d9abca0..211a34efe 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)")