Commit 6bcfe30
committed
Align Clang resource directory lookup with Clang driver logic
Previously, we used `Triple.platformName(conflatingDarwin: true)` to
derive the OS directory under <ResourceDir>/lib/, which was documented
as “the name clang uses”. However, this was in fact closer to what
Swift itself uses for resource directories, and it diverged from
Clang’s behavior in some cases.
For example, for wasm32-unknown-wasip1-threads, Swift uses "wasi" as the
OS name, but Clang uses "wasip1", matching the result of Triple::getOS,
in their resource directory lookup.
This patch aligns the behavior with Clang’s logic for looking up the
compiler resource directory libraries.1 parent f7b8007 commit 6bcfe30
File tree
3 files changed
+32
-7
lines changed- Sources/SwiftDriver
- Jobs
- Utilities
- Tests/SwiftDriverTests
3 files changed
+32
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 29 | + | |
35 | 30 | | |
36 | 31 | | |
37 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
307 | 328 | | |
308 | 329 | | |
309 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1317 | 1317 | | |
1318 | 1318 | | |
1319 | 1319 | | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
1320 | 1329 | | |
1321 | 1330 | | |
1322 | 1331 | | |
| |||
0 commit comments