aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-06-04 06:27:06 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-06-04 06:27:06 +0000
commit80df02592ccc283b20b66959f74c6d61af28cadb (patch)
tree43ccf578d85d1ffac7a65c7b423ed73984161a7e /lib/Driver/Tools.cpp
parent7e46d0b8436d844d77f3ff580b6e1204e0407044 (diff)
On linux, -nostdlib was causing a --start-group with no --end-group to be passed
to the linker. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132629 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 695077058b..87358cc4b0 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -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");