[cfe-commits] r81022 - /cfe/trunk/lib/Driver/Tools.cpp
Daniel Dunbar
daniel at zuster.org
Fri Sep 4 11:35:47 PDT 2009
Author: ddunbar
Date: Fri Sep 4 13:35:47 2009
New Revision: 81022
URL: http://llvm.org/viewvc/llvm-project?rev=81022&view=rev
Log:
Merge libgcc spec changes for darwin::Link::ConstructJob.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=81022&r1=81021&r2=81022&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Sep 4 13:35:47 2009
@@ -1700,7 +1700,9 @@
CmdArgs.push_back("-lcrt0.o");
} else {
// Derived from darwin_crt1 spec.
- if (isMacosxVersionLT(MacosxVersion, 10, 5))
+ if (getDarwinToolChain().isIPhone()) {
+ CmdArgs.push_back("-lcrt1.o");
+ } else if (isMacosxVersionLT(MacosxVersion, 10, 5))
CmdArgs.push_back("-lcrt1.o");
else if (isMacosxVersionLT(MacosxVersion, 10, 6))
CmdArgs.push_back("-lcrt1.10.5.o");
@@ -1789,7 +1791,11 @@
CmdArgs.push_back("-lgcc_eh");
} else if (Args.hasArg(options::OPT_miphoneos_version_min_EQ)) {
// Derived from darwin_iphoneos_libgcc spec.
- CmdArgs.push_back("-lgcc_s.10.5");
+ if (getDarwinToolChain().isIPhone()) {
+ CmdArgs.push_back("-lgcc_s.1");
+ } else {
+ CmdArgs.push_back("-lgcc_s.10.5");
+ }
} else if (Args.hasArg(options::OPT_shared_libgcc) ||
// FIXME: -fexceptions -fno-exceptions means no exceptions
Args.hasArg(options::OPT_fexceptions) ||
@@ -1808,7 +1814,8 @@
CmdArgs.push_back("-lgcc_s.10.5");
}
- if (isMacosxVersionLT(MacosxVersion, 10, 6)) {
+ if (getDarwinToolChain().isIPhone() ||
+ isMacosxVersionLT(MacosxVersion, 10, 6)) {
CmdArgs.push_back("-lgcc");
CmdArgs.push_back("-lSystem");
} else {
More information about the cfe-commits
mailing list