Clang has custom handling of --no-demangle, where it is removed
from the input -Wl and -Xlinker options, and readded specifically
by the drivers where it's known to be supported.
Both ld.bfd and lld support the --no-demangle option.
Differential D114064
[clang] [MinGW] Pass --no-demangle through to the mingw linker mstorsjo on Nov 16 2021, 11:57 PM. Authored by
Details Clang has custom handling of --no-demangle, where it is removed Both ld.bfd and lld support the --no-demangle option.
Diff Detail
Event TimelineComment Actions Adding more potential reviewers. For context, see https://github.com/llvm/llvm-project/blob/llvmorg-14-init/clang/lib/Driver/Driver.cpp#L335-L353 where the original option is filtered out. Comment Actions Not sure what the exact division of labor is between the GNU and MinGW backends, but assuming there is no way to share this between them the patch looks good. Comment Actions Yeah. Also at this point, this option should probably rather be handled as opt-out for targets that don’t support it, instead of having every single target do manual work to pass it through. Additionally, this probably doesn’t handle sequences of --no-demangle --demangle correctly, but this just gets this target to the same level as e.g. GNU. |