From: Bob Wilson Date: Tue, 10 Feb 2015 06:33:04 +0000 (+0000) Subject: Do not force "-static" for aarch64 iOS kernel/kext assembly code. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e891e8a0a567ffaeae34151a4e1db37a27c4576b;p=clang Do not force "-static" for aarch64 iOS kernel/kext assembly code. 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 --- diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h index 47fb10d3f6..90893c305c 100644 --- a/lib/Driver/ToolChains.h +++ b/lib/Driver/ToolChains.h @@ -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: diff --git a/test/Driver/pic.c b/test/Driver/pic.c index a3d989c8b4..3a14d61cf1 100644 --- a/test/Driver/pic.c +++ b/test/Driver/pic.c @@ -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" @@ -200,6 +202,8 @@ // 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 \