From 64d271941379661f2c55be4ead57d4c5126a978f Mon Sep 17 00:00:00 2001 From: Renato Golin Date: Wed, 11 Dec 2013 09:35:10 +0000 Subject: [PATCH] Turning IAS on by default on ARM/Thumb This is an experimental feature, where -integrated-as will be on by default on ARM/Thumb. We aim to detect the missing features so that the next release is stable. Updating the ReleaseNotes, too. Also moving the AArch64 into the same place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197024 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/ReleaseNotes.rst | 11 ++++++++++- lib/Driver/ToolChains.cpp | 5 ++++- lib/Driver/ToolChains.h | 6 ------ test/Driver/freebsd.c | 4 ++-- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst index 9765357d7a..569d5e8420 100644 --- a/docs/ReleaseNotes.rst +++ b/docs/ReleaseNotes.rst @@ -64,7 +64,16 @@ New Compiler Flags C Language Changes in Clang --------------------------- -... +The integrated assembler is now turned on by default on ARM (and Thumb), +so the use of the option `-integrated-as` is now redundant on those +architectures. This is an important move to both *eat our own dog food* +and to ease cross-compilation tremendously. + +We are aware of the problems that this may cause for code bases that +rely on specific GNU syntax or extensions, and we're working towards +getting them all fixed. Please, report bugs or feature requests if +you find anything. In the meantime, use `-no-integrated-as` to revert +back the call to GNU assembler. C11 Feature Support ^^^^^^^^^^^^^^^^^^^ diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 63584882cd..3a3b26a78e 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -1611,7 +1611,10 @@ bool Generic_GCC::isPICDefaultForced() const { bool Generic_GCC::IsIntegratedAssemblerDefault() const { return getTriple().getArch() == llvm::Triple::x86 || - getTriple().getArch() == llvm::Triple::x86_64; + getTriple().getArch() == llvm::Triple::x86_64 || + getTriple().getArch() == llvm::Triple::aarch64 || + getTriple().getArch() == llvm::Triple::arm || + getTriple().getArch() == llvm::Triple::thumb; } /// Hexagon Toolchain diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h index 7c4d59fe9a..c061a1f462 100644 --- a/lib/Driver/ToolChains.h +++ b/lib/Driver/ToolChains.h @@ -413,12 +413,6 @@ public: Generic_ELF(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args) : Generic_GCC(D, Triple, Args) {} - - virtual bool IsIntegratedAssemblerDefault() const { - if (getTriple().getArch() == llvm::Triple::aarch64) - return true; - return Generic_GCC::IsIntegratedAssemblerDefault(); - } }; class LLVM_LIBRARY_VISIBILITY AuroraUX : public Generic_GCC { diff --git a/test/Driver/freebsd.c b/test/Driver/freebsd.c index 9435923d58..795372fb89 100644 --- a/test/Driver/freebsd.c +++ b/test/Driver/freebsd.c @@ -97,12 +97,12 @@ // CHECK-NORMAL: crt1.o // CHECK-NORMAL: crtbegin.o -// RUN: %clang %s -### -o %t.o -target arm-unknown-freebsd10.0 2>&1 \ +// RUN: %clang %s -### -o %t.o -target arm-unknown-freebsd10.0 -no-integrated-as 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-ARM %s // CHECK-ARM: clang{{.*}}" "-cc1"{{.*}}" "-fsjlj-exceptions" // CHECK-ARM: as{{.*}}" "-mfpu=softvfp"{{.*}}"-matpcs" -// RUN: %clang %s -### -o %t.o -target arm-gnueabi-freebsd10.0 2>&1 \ +// RUN: %clang %s -### -o %t.o -target arm-gnueabi-freebsd10.0 -no-integrated-as 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-ARM-EABI %s // CHECK-ARM-EABI-NOT: clang{{.*}}" "-cc1"{{.*}}" "-fsjlj-exceptions" // CHECK-ARM-EABI: as{{.*}}" "-mfpu=softvfp" "-meabi=5" -- 2.40.0