-plugin-opt linker flags require a leading dash when using GCC as a linker #130583
Labels
A-codegen
Area: Code generation
A-gcc
Things relevant to the [future] GCC backend
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Hi.
I was testing cross-language LTO with rustc_codegen_gcc (using GCC as the linker) and I needed to add a leading dash to the flags in this code in order to make cross-language LTO working, so that it looks like this:
Otherwise, GCC will error out with:
It would be nice to have the code working for both GCC and clang.
How would you support both?
Interestingly,
clang
seems to support a leading dash in the case of-plugin-opt=-mcpu=x86-64
, but not-plugin-opt=-O3
.Thanks.
The text was updated successfully, but these errors were encountered: