]> granicus.if.org Git - clang/commitdiff
Do not force "-static" for aarch64 iOS kernel/kext assembly code.
authorBob Wilson <bob.wilson@apple.com>
Tue, 10 Feb 2015 06:33:04 +0000 (06:33 +0000)
committerBob Wilson <bob.wilson@apple.com>
Tue, 10 Feb 2015 06:33:04 +0000 (06:33 +0000)
Somehow a check for aarch64 was added to the Darwin toolchain's
isKernelStatic function as part of the initial commit for Apple's
arm64 target (r205100). That check was not in any of Apple's internal
code and no one here knows where it came from. It has been harmless
because "-static" does not change much, if anything, for arm64 iOS code,
but it makes no sense to keep this check.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@228673 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains.h
test/Driver/pic.c

index 47fb10d3f6c525669843b44736ecef0e76e1472f..90893c305c8d1697e900571906e07598d7abbe05 100644 (file)
@@ -362,8 +362,7 @@ public:
                          llvm::opt::ArgStringList &CmdArgs) const override;
 
   bool isKernelStatic() const override {
-    return !isTargetIPhoneOS() || isIPhoneOSVersionLT(6, 0) ||
-           getTriple().getArch() == llvm::Triple::aarch64;
+    return !isTargetIPhoneOS() || isIPhoneOSVersionLT(6, 0);
   }
 
 protected:
index a3d989c8b4f46d76e815e5e3fed56a5b38096b07..3a14d61cf1c6533f99c6c1e178abb1402a4a1cc5 100644 (file)
@@ -11,6 +11,8 @@
 // CHECK-PIC2: "-mrelocation-model" "pic"
 // CHECK-PIC2: "-pic-level" "2"
 //
+// CHECK-NO-STATIC-NOT: "-static"
+//
 // CHECK-PIE1: "-mrelocation-model" "pic"
 // CHECK-PIE1: "-pic-level" "1"
 // CHECK-PIE1: "-pie-level" "1"
 // RUN:   | FileCheck %s --check-prefix=CHECK-PIC2
 // RUN: %clang -c %s -target arm64-apple-ios -mkernel -miphoneos-version-min=7.0.0 -### 2>&1 \
 // RUN:   | FileCheck %s --check-prefix=CHECK-PIC2
+// RUN: %clang -x assembler -c %s -target arm64-apple-ios -mkernel -miphoneos-version-min=7.0.0 -no-integrated-as -### 2>&1 \
+// RUN:   | FileCheck %s --check-prefix=CHECK-NO-STATIC
 // RUN: %clang -c %s -target armv7-apple-ios -fapple-kext -miphoneos-version-min=5.0.0 -### 2>&1 \
 // RUN:   | FileCheck %s --check-prefix=CHECK-NO-PIC
 // RUN: %clang -c %s -target armv7-apple-ios -fapple-kext -miphoneos-version-min=6.0.0 -static -### 2>&1 \