forked from OSchip/llvm-project
Fix -Wl,--no-demangle to actually pass the flag to the linker on Linux instead
of silently dropping it on the floor. llvm-svn: 162075
This commit is contained in:
parent
034b94a557
commit
2fe6aab788
|
@ -5723,6 +5723,9 @@ void linuxtools::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
CmdArgs.push_back(Args.MakeArgString(Plugin));
|
||||
}
|
||||
|
||||
if (Args.hasArg(options::OPT_Z_Xlinker__no_demangle))
|
||||
CmdArgs.push_back("--no-demangle");
|
||||
|
||||
AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs);
|
||||
|
||||
if (D.CCCIsCXX &&
|
||||
|
|
|
@ -4,6 +4,13 @@
|
|||
// RUN: %clang -target i386-apple-darwin9 -### \
|
||||
// RUN: -Xlinker one -Xlinker --no-demangle \
|
||||
// RUN: -Wl,two,--no-demangle,three -Xlinker four %s 2> %t
|
||||
// RUN: FileCheck < %t %s
|
||||
// RUN: FileCheck -check-prefix=DARWIN < %t %s
|
||||
//
|
||||
// CHECK: "one" "two" "three" "four"
|
||||
// RUN: %clang -target x86_64-pc-linux-gnu -### \
|
||||
// RUN: -Xlinker one -Xlinker --no-demangle \
|
||||
// RUN: -Wl,two,--no-demangle,three -Xlinker four %s 2> %t
|
||||
// RUN: FileCheck -check-prefix=LINUX < %t %s
|
||||
//
|
||||
// DARWIN-NOT: --no-demangle
|
||||
// DARWIN: "one" "two" "three" "four"
|
||||
// LINUX: "--no-demangle" "one" "two" "three" "four"
|
||||
|
|
Loading…
Reference in New Issue