forked from OSchip/llvm-project
[darwin][driver] Do not link with libarclite when building for Apple Silicon macOS
This commit is contained in:
parent
5fb5f7b5ab
commit
253988f0f4
|
@ -971,6 +971,8 @@ void DarwinClang::AddLinkARCArgs(const ArgList &Args,
|
|||
// Avoid linking compatibility stubs on i386 mac.
|
||||
if (isTargetMacOS() && getArch() == llvm::Triple::x86)
|
||||
return;
|
||||
if (isTargetAppleSiliconMac())
|
||||
return;
|
||||
|
||||
ObjCRuntime runtime = getDefaultObjCRuntime(/*nonfragile*/ true);
|
||||
|
||||
|
|
|
@ -409,6 +409,17 @@ protected:
|
|||
return TargetPlatform == MacOS;
|
||||
}
|
||||
|
||||
bool isTargetMacOSBased() const {
|
||||
assert(TargetInitialized && "Target not initialized!");
|
||||
// FIXME (Alex L): Add remaining MacCatalyst suppport.
|
||||
return TargetPlatform == MacOS;
|
||||
}
|
||||
|
||||
bool isTargetAppleSiliconMac() const {
|
||||
assert(TargetInitialized && "Target not initialized!");
|
||||
return isTargetMacOSBased() && getArch() == llvm::Triple::aarch64;
|
||||
}
|
||||
|
||||
bool isTargetInitialized() const { return TargetInitialized; }
|
||||
|
||||
VersionTuple getTargetVersion() const {
|
||||
|
|
|
@ -15,3 +15,6 @@
|
|||
// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -fobjc-arc -mmacosx-version-min=10.10 %s 2>&1 | FileCheck -check-prefix=CHECK-UNUSED %s
|
||||
|
||||
// CHECK-UNUSED-NOT: warning: argument unused during compilation: '-fobjc-link-runtime'
|
||||
|
||||
// RUN: %clang -### -target arm64-apple-macos10.8 -fobjc-link-runtime %t.o 2>&1 | FileCheck -check-prefix=CHECK-ARCLITE-ARM-MAC %s
|
||||
// CHECK-ARCLITE-ARM-MAC-NOT: libarclite
|
||||
|
|
Loading…
Reference in New Issue