[PATCH] D150758: [AIX] make integrated-as as default on AIX.

Esme Yi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 23 03:46:29 PDT 2023


Esme updated this revision to Diff 524641.
Esme added a comment.

Separate the backend changes from this patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150758/new/

https://reviews.llvm.org/D150758

Files:
  clang/lib/Driver/ToolChains/AIX.h
  clang/test/Driver/aix-as.c
  clang/test/Driver/aix-integrated-as.c


Index: clang/test/Driver/aix-integrated-as.c
===================================================================
--- /dev/null
+++ clang/test/Driver/aix-integrated-as.c
@@ -0,0 +1,17 @@
+// 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-IAS32: "aix-integrated-as.o"
+
+// 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"
+// CHECK-IAS64: "aix-integrated-as.o"
Index: clang/test/Driver/aix-as.c
===================================================================
--- clang/test/Driver/aix-as.c
+++ clang/test/Driver/aix-as.c
@@ -2,7 +2,7 @@
 // only test assembler functionalities in this suite.
 
 // Check powerpc-ibm-aix7.1.0.0, 32-bit.
-// RUN: %clang %s -### -c 2>&1 \
+// RUN: %clang %s -### -c 2>&1 -fno-integrated-as \
 // RUN:         --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:   | FileCheck --check-prefix=CHECK-AS32 %s
 // CHECK-AS32-NOT: warning:
@@ -12,7 +12,7 @@
 // CHECK-AS32: "-many" 
 
 // Check powerpc64-ibm-aix7.1.0.0, 64-bit.
-// RUN: %clang %s -### -c 2>&1 \
+// RUN: %clang %s -### -c 2>&1 -fno-integrated-as \
 // RUN:         --target=powerpc64-ibm-aix7.1.0.0 \
 // RUN:   | FileCheck --check-prefix=CHECK-AS64 %s
 // CHECK-AS64-NOT: warning:
@@ -22,7 +22,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 2>&1 -fno-integrated-as \
 // RUN:         -Xassembler -w \
 // RUN:         --target=powerpc-ibm-aix7.1.0.0 \
 // RUN:   | FileCheck --check-prefix=CHECK-AS32-Xassembler %s
@@ -34,7 +34,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 2>&1 -fno-integrated-as \
 // RUN:         -Wa,-v,-w \
 // RUN:         --target=powerpc64-ibm-aix7.1.0.0 \
 // RUN:   | FileCheck --check-prefix=CHECK-AS64-Wa %s
@@ -47,7 +47,7 @@
 // CHECK-AS64-Wa: "-w"
 
 // Check powerpc-ibm-aix7.1.0.0, 32-bit. Multiple input files.
-// RUN: %clang -### -c \
+// RUN: %clang -### -c -fno-integrated-as \
 // 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 \
@@ -67,8 +67,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 \
Index: clang/lib/Driver/ToolChains/AIX.h
===================================================================
--- clang/lib/Driver/ToolChains/AIX.h
+++ clang/lib/Driver/ToolChains/AIX.h
@@ -68,6 +68,7 @@
   }
   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,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150758.524641.patch
Type: text/x-patch
Size: 3660 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230523/902fcdfb/attachment-0001.bin>


More information about the cfe-commits mailing list