forked from OSchip/llvm-project
On linux, -nostdlib was causing a --start-group with no --end-group to be passed
to the linker. llvm-svn: 132629
This commit is contained in:
parent
43efe1c8bd
commit
97864dac76
|
@ -3945,10 +3945,10 @@ void linuxtools::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
CmdArgs.push_back("-lm");
|
||||
}
|
||||
|
||||
if (Args.hasArg(options::OPT_static))
|
||||
CmdArgs.push_back("--start-group");
|
||||
|
||||
if (!Args.hasArg(options::OPT_nostdlib)) {
|
||||
if (Args.hasArg(options::OPT_static))
|
||||
CmdArgs.push_back("--start-group");
|
||||
|
||||
if (!D.CCCIsCXX)
|
||||
CmdArgs.push_back("-lgcc");
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
// RUN: %clang -ccc-host-triple i686-pc-linux-gnu -### -nostdlib %s 2> %t
|
||||
// RUN: FileCheck < %t %s
|
||||
//
|
||||
// CHECK-NOT: start-group
|
Loading…
Reference in New Issue