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 <stefanc@matrix.org>

---------

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
This commit is contained in:
Mauro 2023-06-12 11:11:53 +02:00 committed by GitHub
parent 8483f6e76f
commit 0f358a6b2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)")