Commit 21e3336
authored
SwiftSDK: Remove hardcoded WASI sysroot path derivation (#8468)
Remove hardcoded WASI sysroot path derivation just for wasi-sysroot embedded in toolchains
### Motivation:
The previous implementation assumed there is $TOOLCHAIN_ROOT/share/wasi-sysroot when `--triple wasm32-unknown-wasi` is passed, but this is no longer the case with the [deprecation of the Wasm toolchain installation](swiftwasm/swift#5604) in favor of Swift SDKs.
Due to this unnecessary branch, when `--triple wasm32-unknown-wasi` is passed together with `--swift-sdk`, `--swift-sdk` is just ignored: #8465
### Modifications:
This change removes the hardcoded path derivation for the WASI sysroot from the `SwiftSDK.deriveTargetSwiftSDK` method.
### Result:
When `--triple wasm32-unknown-wasi` is passed without `--swift-sdk`, no user visible change and they will keep getting the following:
```
error: emit-module command failed with exit code 1 (use -v to see invocation)
<unknown>:0: warning: libc not found for 'wasm32-unknown-wasi'; C stdlib may be unavailable
<unknown>:0: error: unable to load standard library for target 'wasm32-unknown-wasi'
```
When `--triple wasm32-unknown-wasi` is passed together with `--swift-sdk`, `--triple` is ignored and `--swift-sdk` is respected.1 parent cc0b1a5 commit 21e3336
File tree
2 files changed
+0
-24
lines changed- Sources/PackageModel/SwiftSDKs
- Tests/PackageModelTests
2 files changed
+0
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
691 | 691 | | |
692 | 692 | | |
693 | 693 | | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | 694 | | |
706 | 695 | | |
707 | 696 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | 453 | | |
467 | 454 | | |
468 | 455 | | |
| |||
0 commit comments