Repository navigation
Commit b30f5b4
authored
fix: don't prefer clang for -Clinker-plugin-lto=no (#2046)
`prefer_clang` looked for the text `linker-plugin-lto` anywhere in
`CARGO_ENCODED_RUSTFLAGS`, so `-Clinker-plugin-lto=no` (or `n`, `off`,
`false`, or a later `=no` after an enabling flag) and unrelated flags
that merely contain the text still made cc look for `clang` first when
`CC` is not set.
Use the parsed value from `RustcCodegenFlags` instead, the same one
that decides whether `-flto=thin` is passed.1 parent fb5eb51 commit b30f5b4
3 files changed
Lines changed: 40 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
284 | 289 | | |
285 | 290 | | |
286 | 291 | | |
| |||
435 | 440 | | |
436 | 441 | | |
437 | 442 | | |
438 | | - | |
| 443 | + | |
439 | 444 | | |
440 | 445 | | |
441 | 446 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3962 | 3962 | | |
3963 | 3963 | | |
3964 | 3964 | | |
| 3965 | + | |
| 3966 | + | |
3965 | 3967 | | |
3966 | 3968 | | |
3967 | | - | |
| 3969 | + | |
| 3970 | + | |
| 3971 | + | |
| 3972 | + | |
3968 | 3973 | | |
3969 | 3974 | | |
3970 | 3975 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
0 commit comments