[clang] 533af6e - [AIX] make integrated-as as default on AIX.
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 6 00:17:40 PDT 2023
Author: esmeyi
Date: 2023-07-06T03:16:10-04:00
New Revision: 533af6e5c4b35b72805cdbd6229644d288e172e4
URL: https://github.com/llvm/llvm-project/commit/533af6e5c4b35b72805cdbd6229644d288e172e4
DIFF: https://github.com/llvm/llvm-project/commit/533af6e5c4b35b72805cdbd6229644d288e172e4.diff
LOG: [AIX] make integrated-as as default on AIX.
Summary: Clang uses LLVM's integrated assembler by default on most targets, however non-integrated-as mode is default on AIX. Currently integrated-as mode on AIX has passed tests of LLVM test-suite, bootstrap and Spec2017, therefore this patch sets integrated-as as the default assembler mode on AIX.
Reviewed By: DiggerLin
Differential Revision: https://reviews.llvm.org/D150758
Added:
clang/test/Driver/aix-integrated-as.c
Modified:
clang/lib/Driver/ToolChains/AIX.h
clang/test/Driver/aix-as.c
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/AIX.h b/clang/lib/Driver/ToolChains/AIX.h
index cc74e5ea85efca..245639d60c5f25 100644
--- a/clang/lib/Driver/ToolChains/AIX.h
+++ b/clang/lib/Driver/ToolChains/AIX.h
@@ -68,6 +68,7 @@ class LLVM_LIBRARY_VISIBILITY AIX : public ToolChain {
}
bool isPICDefaultForced() const override { return true; }
bool HasNativeLLVMSupport() const override { return true; }
+ bool IsIntegratedAssemblerDefault() const override { return true; }
void
AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
diff --git a/clang/test/Driver/aix-as.c b/clang/test/Driver/aix-as.c
index c6aeae4c101835..4164348b60127b 100644
--- a/clang/test/Driver/aix-as.c
+++ b/clang/test/Driver/aix-as.c
@@ -11,7 +11,7 @@
// RUN: | FileCheck --check-prefix=CHECK-AS32 %s
// Check powerpc-ibm-aix7.1.0.0, 32-bit.
-// RUN: %clang %s -### -c 2>&1 \
+// RUN: %clang %s -### -c -fno-integrated-as 2>&1 \
// RUN: --target=powerpc-ibm-aix7.1.0.0 \
// RUN: | FileCheck --check-prefixes=CHECK-AS32,CHECK-AS32-CC1 %s
// CHECK-AS32-NOT: warning:
@@ -30,7 +30,7 @@
// RUN: | FileCheck --check-prefix=CHECK-AS64 %s
// Check powerpc64-ibm-aix7.1.0.0, 64-bit.
-// RUN: %clang %s -### -c 2>&1 \
+// RUN: %clang %s -### -c -fno-integrated-as 2>&1 \
// RUN: --target=powerpc64-ibm-aix7.1.0.0 \
// RUN: | FileCheck --check-prefixes=CHECK-AS64,CHECK-AS64-CC1 %s
// CHECK-AS64-NOT: warning:
@@ -40,7 +40,7 @@
// CHECK-AS64: "-many"
// Check powerpc-ibm-aix7.1.0.0, 32-bit. -Xassembler <arg> option.
-// RUN: %clang %s -### -c 2>&1 \
+// RUN: %clang %s -### -c -fno-integrated-as 2>&1 \
// RUN: -Xassembler -w \
// RUN: --target=powerpc-ibm-aix7.1.0.0 \
// RUN: | FileCheck --check-prefix=CHECK-AS32-Xassembler %s
@@ -52,7 +52,7 @@
// CHECK-AS32-Xassembler: "-w"
// Check powerpc64-ibm-aix7.1.0.0, 64-bit. -Wa,<arg>,<arg> option.
-// RUN: %clang %s -### -c 2>&1 \
+// RUN: %clang %s -### -c -fno-integrated-as 2>&1 \
// RUN: -Wa,-v,-w \
// RUN: --target=powerpc64-ibm-aix7.1.0.0 \
// RUN: | FileCheck --check-prefix=CHECK-AS64-Wa %s
@@ -65,7 +65,7 @@
// CHECK-AS64-Wa: "-w"
// Check powerpc-ibm-aix7.1.0.0, 32-bit. Multiple input files.
-// RUN: %clang -### -c \
+// RUN: %clang -### -fno-integrated-as -c \
// RUN: %S/Inputs/aix_ppc_tree/dummy0.s \
// RUN: %S/Inputs/aix_ppc_tree/dummy1.s \
// RUN: %S/Inputs/aix_ppc_tree/dummy2.s 2>&1 \
@@ -85,8 +85,8 @@
// Check not passing no-integrated-as flag by default.
// RUN: %clang %s -### -c 2>&1 --target=powerpc64-ibm-aix7.1.0.0 \
// RUN: | FileCheck --check-prefix=CHECK-IAS --implicit-check-not=-no-integrated-as %s
+// CHECK-IAS-NOT: "-a64"
// CHECK-IAS: InstalledDir
-// CHECK-IAS: "-a64"
// Check passing no-integrated-as flag if specified by user.
// RUN: %clang %s -### -c 2>&1 --target=powerpc64-ibm-aix7.1.0.0 -fno-integrated-as \
diff --git a/clang/test/Driver/aix-integrated-as.c b/clang/test/Driver/aix-integrated-as.c
new file mode 100644
index 00000000000000..25e020c6f5a62a
--- /dev/null
+++ b/clang/test/Driver/aix-integrated-as.c
@@ -0,0 +1,15 @@
+// Test integrated-as is called by default on AIX.
+
+// Check powerpc-ibm-aix7.1.0.0, 32-bit.
+// RUN: %clang %s -### -c 2>&1 \
+// RUN: --target=powerpc-ibm-aix7.1.0.0 \
+// RUN: | FileCheck --check-prefix=CHECK-IAS32 %s
+// CHECK-IAS32-NOT: "-a32"
+// CHECK-IAS32: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0" "-emit-obj"
+
+// Check powerpc64-ibm-aix7.1.0.0, 64-bit.
+// RUN: %clang %s -### -c 2>&1 \
+// RUN: --target=powerpc64-ibm-aix7.1.0.0 \
+// RUN: | FileCheck --check-prefix=CHECK-IAS64 %s
+// CHECK-IAS64-NOT: "-a64"
+// CHECK-IAS64: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0" "-emit-obj"
More information about the cfe-commits
mailing list