Commit 3e202ea
authored
Rollup merge of rust-lang#118378 - cormacrelf:bugfix/linker-plugin-lto-wasm, r=petrochenkov
Perform LTO optimisations with wasm-ld + -Clinker-plugin-lto
Fixes (partially) rust-lang#60059. Technically, `--target wasm32-unknown-unknown -Clinker-plugin-lto` would complete without errors before, but it was not producing optimized code. At least, it may have been but it was probably not the opt-level people intended.
Similarly to rust-lang#118377, this could benefit from a warning about using an explicit libLTO path with LLD, which will ignore it and use its internal LLVM. Especially given we always use lld on wasm targets. I left the code open to that possibility rather than making it perfectly neat.1 file changed
+27
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1308 | 1308 | | |
1309 | 1309 | | |
1310 | 1310 | | |
| 1311 | + | |
| 1312 | + | |
1311 | 1313 | | |
1312 | 1314 | | |
1313 | 1315 | | |
| |||
1360 | 1362 | | |
1361 | 1363 | | |
1362 | 1364 | | |
1363 | | - | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
1364 | 1390 | | |
1365 | 1391 | | |
1366 | 1392 | | |
| |||
0 commit comments