File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
clang/lib/Driver/ToolChains Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1645,9 +1645,11 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args,
16451645 CmdArgs.push_back (" -lSystem" );
16461646
16471647 // Select the dynamic runtime library and the target specific static library.
1648- // If we are compiling as iOS / simulator, don't attempt to link libgcc_s.1,
1649- // it never went into the SDK.
1650- // Linking against libgcc_s.1 isn't needed for iOS 5.0+ or macOS 10.6+
1648+ // Some old Darwin versions put builtins, libunwind, and some other stuff in
1649+ // libgcc_s.1.dylib. MacOS X 10.6 and iOS 5 moved those functions to
1650+ // libSystem, and made libgcc_s.1.dylib a stub. We never link libgcc_s when
1651+ // building for aarch64 or iOS simulator, since libgcc_s was made obsolete
1652+ // before either existed.
16511653 if (getTriple ().getArch () != llvm::Triple::aarch64 &&
16521654 ((isTargetIOSBased () && isIPhoneOSVersionLT (5 , 0 ) &&
16531655 !isTargetIOSSimulator ()) ||
You can’t perform that action at this time.
0 commit comments