Skip to content
Snippets Groups Projects
Commit 6ee5ac60 authored by Alex Lorenz's avatar Alex Lorenz
Browse files

Add missing OS check to r305678

That commit failed on non-macOS buildbots as I've forgotten to make sure that
the system on which Clang is running on is actually macOS.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305680 91177308-0d34-0410-b5e6-96231b3b80d8
parent cf092e8c
No related branches found
No related tags found
No related merge requests found
...@@ -1124,8 +1124,10 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args, ...@@ -1124,8 +1124,10 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args,
/// then the SDK version is returned. Otherwise the system version is returned. /// then the SDK version is returned. Otherwise the system version is returned.
static std::string getSystemOrSDKMacOSVersion(StringRef MacOSSDKVersion) { static std::string getSystemOrSDKMacOSVersion(StringRef MacOSSDKVersion) {
unsigned Major, Minor, Micro; unsigned Major, Minor, Micro;
llvm::Triple(llvm::sys::getProcessTriple()) llvm::Triple SystemTriple(llvm::sys::getProcessTriple());
.getMacOSXVersion(Major, Minor, Micro); if (!SystemTriple.isMacOSX())
return MacOSSDKVersion;
SystemTriple.getMacOSXVersion(Major, Minor, Micro);
VersionTuple SystemVersion(Major, Minor, Micro); VersionTuple SystemVersion(Major, Minor, Micro);
bool HadExtra; bool HadExtra;
if (!Driver::GetReleaseVersion(MacOSSDKVersion, Major, Minor, Micro, if (!Driver::GetReleaseVersion(MacOSSDKVersion, Major, Minor, Micro,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment