diff --git a/Sources/CartonHelpers/DefaultToolchain.swift b/Sources/CartonHelpers/DefaultToolchain.swift index 5a31bbe..36480fe 100644 --- a/Sources/CartonHelpers/DefaultToolchain.swift +++ b/Sources/CartonHelpers/DefaultToolchain.swift @@ -12,4 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -public let defaultToolchainVersion = "wasm-5.9.0-RELEASE" +// TODO: make this `public let defaultToolchainVersion = "wasm-5.9.0-RELEASE"` +// After a stable wasm-5.9 is released +public let defaultToolchainVersion: String = { + // On macOS 14 (Sonoma) it's not possible to use Xcode older then 15.0 + // Therefore Swift 5.9 is required on Sonoma + if #available(macOS 14, *) { + return "wasm-5.9-SNAPSHOT-2023-08-01-a" + }else{ + // Use the latest stable release otherwise + return "wasm-5.8.0-RELEASE" + } +}()