Commit d1a0119
committed
Only pass a versioned prebuilt-modules for Mac Catalyst if it exists.
Some clients still have unversioned prebuilt modules, but SwiftDriver assumed
that the versioned path would always exist for macOS (at least for the purposes
of passing it when compiling for Mac Catalyst).
This change duplicates some logic from the Swift frontend to check for the
existence of the versioned macOS prebuilt modules directory before passing it,
optionally stripping off trailing `.0` version components.
This change also updates the driver so that it passes a prebuilt modules directory
relative to the resource directory rather than relative to the compiler binary, also
matching the Swift frontend's behavior.
This addresses <rdar://problem/136047054>.
(cherry picked from commit b1573ef)1 parent 8f3f7ba commit d1a0119
File tree
4 files changed
+42
-7
lines changed- Sources/SwiftDriver/Toolchains
- TestInputs
- PrebuiltModules-macOS10.15.xctoolchain/usr/lib/swift/macosx/prebuilt-modules/10.15
- PrebuiltModules-macOSUnversioned.xctoolchain/usr/lib/swift/macosx/prebuilt-modules
- Tests/SwiftDriverTests
4 files changed
+42
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
422 | 441 | | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
| 442 | + | |
428 | 443 | | |
429 | 444 | | |
430 | 445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7029 | 7029 | | |
7030 | 7030 | | |
7031 | 7031 | | |
7032 | | - | |
| 7032 | + | |
| 7033 | + | |
| 7034 | + | |
| 7035 | + | |
| 7036 | + | |
| 7037 | + | |
| 7038 | + | |
| 7039 | + | |
| 7040 | + | |
| 7041 | + | |
| 7042 | + | |
| 7043 | + | |
| 7044 | + | |
| 7045 | + | |
| 7046 | + | |
| 7047 | + | |
| 7048 | + | |
| 7049 | + | |
| 7050 | + | |
| 7051 | + | |
| 7052 | + | |
7033 | 7053 | | |
7034 | 7054 | | |
7035 | 7055 | | |
7036 | 7056 | | |
7037 | 7057 | | |
7038 | 7058 | | |
7039 | | - | |
| 7059 | + | |
7040 | 7060 | | |
7041 | 7061 | | |
7042 | 7062 | | |
| |||
0 commit comments