Skip to content

Commit 40a919f

Browse files
committed
make it one big if statement
1 parent c82c770 commit 40a919f

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

clang/lib/Driver/ToolChains/Darwin.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,13 +1648,11 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args,
16481648
// If we are compiling as iOS / simulator, don't attempt to link libgcc_s.1,
16491649
// it never went into the SDK.
16501650
// Linking against libgcc_s.1 isn't needed for iOS 5.0+ or macOS 10.6+
1651-
if (getTriple().getArch() != llvm::Triple::aarch64) {
1652-
if (isTargetIOSBased() && isIPhoneOSVersionLT(5, 0) &&
1653-
!isTargetIOSSimulator())
1654-
CmdArgs.push_back("-lgcc_s.1");
1655-
else if (isTargetMacOSBased() && isMacosxVersionLT(10, 6))
1656-
CmdArgs.push_back("-lgcc_s.1");
1657-
}
1651+
if (getTriple().getArch() != llvm::Triple::aarch64 &&
1652+
((isTargetIOSBased() && isIPhoneOSVersionLT(5, 0) &&
1653+
!isTargetIOSSimulator()) ||
1654+
(isTargetMacOSBased() && isMacosxVersionLT(10, 6))))
1655+
CmdArgs.push_back("-lgcc_s.1");
16581656
AddLinkRuntimeLib(Args, CmdArgs, "builtins");
16591657
}
16601658

0 commit comments

Comments
 (0)