Commit d6da8a6
authored
Do not forward ARFLAGS (#3763)
This is a partial revert of #3704. It does NOT revert logic that
properly finds the hermetic archiver (binary and associated tests).
cc-rs needs full ownership of flag handling for the archiver. This is in
part due to `ar` having very specific positional flag behaviors, and
partially due to some special logic in how cc-rs constructs static
libraries.
The change to enable `ARFLAGS` was causing many toolchains that pass
flags to the static archiver to error out due to conflicting
expectations for flag handling. Example bad `ar` invocation, where `cq`
is treated as the destination archive instead of the `ar` tool mode:
```
ar rcsD cq dest.a src1.o src2.o
```
This drops forwarding of `ARFLAGS` to fix the common case.1 parent 3cbb3fc commit d6da8a6
File tree
3 files changed
+26
-25
lines changed- cargo/private
- test/cargo_build_script/cc_args_and_env
3 files changed
+26
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | 134 | | |
136 | 135 | | |
137 | 136 | | |
| |||
148 | 147 | | |
149 | 148 | | |
150 | 149 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | 150 | | |
157 | 151 | | |
158 | 152 | | |
159 | 153 | | |
160 | 154 | | |
161 | | - | |
| 155 | + | |
162 | 156 | | |
163 | 157 | | |
164 | 158 | | |
| |||
429 | 423 | | |
430 | 424 | | |
431 | 425 | | |
| 426 | + | |
432 | 427 | | |
433 | 428 | | |
434 | 429 | | |
435 | 430 | | |
436 | 431 | | |
437 | | - | |
| 432 | + | |
438 | 433 | | |
439 | 434 | | |
440 | 435 | | |
| |||
464 | 459 | | |
465 | 460 | | |
466 | 461 | | |
467 | | - | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
468 | 465 | | |
469 | 466 | | |
470 | 467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | | - | |
35 | | - | |
36 | 33 | | |
Lines changed: 20 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
57 | 67 | | |
58 | 68 | | |
59 | 69 | | |
| |||
207 | 217 | | |
208 | 218 | | |
209 | 219 | | |
210 | | - | |
211 | 220 | | |
212 | 221 | | |
213 | 222 | | |
| |||
221 | 230 | | |
222 | 231 | | |
223 | 232 | | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
224 | 243 | | |
225 | 244 | | |
226 | 245 | | |
227 | 246 | | |
228 | 247 | | |
229 | 248 | | |
230 | | - | |
231 | 249 | | |
232 | 250 | | |
233 | 251 | | |
| |||
394 | 412 | | |
395 | 413 | | |
396 | 414 | | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | 415 | | |
409 | 416 | | |
410 | 417 | | |
| |||
0 commit comments