Commit 7f9ea74
committed
[Clang] Extract offloading code from static libs with 'offload-arch='
Summary:
The semantics of static libraries only extract stuff that's used. We
somewhat extend this behavior with the linker wrapper only doing this to
fat binaries that match any found architectures. However, this has some
unfortunate effects when the user uses static libraries.
This is somewhat of a hack, but we now assume that if the user specified
`--offload-arch=` on the link job, they *definitely* want that
architecture to be used if it exists. This patch just forces extraction
of those libraries which resolves an issue observed with some customers.
The old behavior will still be present if the user does `--offload-link`
with no offloading architecture present, and for the vast, vast majority
of cases this will change nothing.
Fixes: #1477881 parent f56b6ec commit 7f9ea74
File tree
4 files changed
+28
-4
lines changed- clang
- lib/Driver/ToolChains
- test/Driver
- tools/clang-linker-wrapper
4 files changed
+28
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9152 | 9152 | | |
9153 | 9153 | | |
9154 | 9154 | | |
9155 | | - | |
| 9155 | + | |
| 9156 | + | |
| 9157 | + | |
9156 | 9158 | | |
9157 | 9159 | | |
9158 | 9160 | | |
| |||
9161 | 9163 | | |
9162 | 9164 | | |
9163 | 9165 | | |
| 9166 | + | |
| 9167 | + | |
| 9168 | + | |
| 9169 | + | |
| 9170 | + | |
9164 | 9171 | | |
9165 | 9172 | | |
9166 | 9173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1302 | 1302 | | |
1303 | 1303 | | |
1304 | 1304 | | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
1305 | 1308 | | |
1306 | 1309 | | |
1307 | 1310 | | |
| |||
1315 | 1318 | | |
1316 | 1319 | | |
1317 | 1320 | | |
1318 | | - | |
1319 | | - | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
1320 | 1324 | | |
1321 | 1325 | | |
1322 | 1326 | | |
| |||
1330 | 1334 | | |
1331 | 1335 | | |
1332 | 1336 | | |
1333 | | - | |
| 1337 | + | |
1334 | 1338 | | |
1335 | 1339 | | |
1336 | 1340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
| |||
0 commit comments