Commit 9bdb284
committed
fix(flags): -fPIC is a property of the target format, not of the dialect
Windows CI, once the packer stopped swallowing the compiler's output:
error: unsupported option '-fPIC' for target 'x86_64-pc-windows-msvc'
every MSVC-ABI shared build died in clang-scan-deps before compiling anything.
The comment beside the condition already said the right thing — "PE code is
position independent by design" — and the condition tested the DIALECT:
`!isMsvcDialect`. Windows' default toolchain is clang, which speaks the GNU
dialect while targeting the MSVC ABI, so the flag went out anyway.
Same shape as the shared-library guard this PR replaced: asking which COMPILER
when the question is which TARGET. It keys on the target format now.
Unreachable until this PR, because `kind = "shared"` was refused on that ABI —
the refusal was hiding an untested path, which is what refusals do. 257 pins the
absence on every Linux CI pass through mingw-cross rather than only on Windows:
the flag is equally meaningless for a PE target whichever compiler emits it, and
GCC merely ignores it where clang refuses.1 parent c8ac60a commit 9bdb284
2 files changed
Lines changed: 34 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
411 | 412 | | |
412 | 413 | | |
413 | 414 | | |
414 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
415 | 432 | | |
416 | 433 | | |
417 | 434 | | |
418 | 435 | | |
419 | 436 | | |
420 | 437 | | |
421 | 438 | | |
422 | | - | |
| 439 | + | |
423 | 440 | | |
424 | 441 | | |
425 | 442 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
69 | 84 | | |
70 | 85 | | |
71 | 86 | | |
| |||
0 commit comments