llvmPackages{12-git}.clang: don't swallow unsupported option errors when compiling + linking#356547
llvmPackages{12-git}.clang: don't swallow unsupported option errors when compiling + linking#356547emilazy merged 1 commit intoNixOS:llvm-19from paparodeo:clang-args-fix
Conversation
…hen compiling + linking `https://github.com/llvm/llvm-project/issues/116278` make clang report unsupported option errors / warning when compiling + linking in the same command. this works ``` $ clang --target=aarch64 -mpopcnt hello.c clang: error: unsupported option '-mpopcnt' for target aarch64 ``` before change clang swallows the error ``` $ clang --target=aarch64 -mpopcnt hello.c -lc $ echo $? 0 ``` after change error is reported: ``` $ clang --target=aarch64 -mpopcnt hello.c -lc clang: error: unsupported option '-mpopcnt' for target aarch64 ```
emilazy
left a comment
There was a problem hiding this comment.
The patch seems reasonable and it seems like the most elegant fix for the OCaml problem. We can revert if upstream has opinions on it later.
…hen compiling + linking (#356547)
…hen compiling + linking (#356547)
it is now merged upstream |
|
Next LLVM bump will drop the patch. Also, we probably should be using |
yeah, it is merged upstream so I guess the next git update will conflict. when this PR was merged it was not clear when upstream would accept the patch. [edit] tho after looking at it a little |
llvm/llvm-project#116278
llvm/llvm-project#116476
the test case is dropped from the patch as it doesn't apply cleanly to clang < 17
make clang report unsupported option errors / warning when compiling + linking in the same command.
this works
before change clang swallows the error
after change error is reported:
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.
@emilazy