[PATCH] D148490: [AIX] use system assembler for assembly files
ChenZheng via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 4 18:38:26 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4b27ad735c8d: [AIX] use system assembler for assembly files (authored by shchenz).
Changed prior to commit:
https://reviews.llvm.org/D148490?vs=521233&id=528257#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148490/new/
https://reviews.llvm.org/D148490
Files:
clang/lib/Driver/ToolChain.cpp
clang/test/Driver/aix-as.c
Index: clang/test/Driver/aix-as.c
===================================================================
--- clang/test/Driver/aix-as.c
+++ clang/test/Driver/aix-as.c
@@ -1,22 +1,40 @@
// General tests that as(1) invocations on AIX targets are sane. Note that we
// only test assembler functionalities in this suite.
+// Check powerpc-ibm-aix7.1.0.0, system assembler is used for assembly files, 32-bit.
+// RUN: %clang -x assembler %s -### -c -fintegrated-as 2>&1 \
+// RUN: --target=powerpc-ibm-aix7.1.0.0 \
+// RUN: | FileCheck --check-prefix=CHECK-AS32 %s
+//
+// RUN: %clang -x assembler %s -### -c 2>&1 -fno-integrated-as \
+// RUN: --target=powerpc-ibm-aix7.1.0.0 \
+// RUN: | FileCheck --check-prefix=CHECK-AS32 %s
+
// 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-AS32 %s
+// RUN: | FileCheck --check-prefixes=CHECK-AS32,CHECK-AS32-CC1 %s
// CHECK-AS32-NOT: warning:
-// CHECK-AS32: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
+// CHECK-AS32-CC1: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
// CHECK-AS32: "{{.*}}as{{(.exe)?}}"
// CHECK-AS32: "-a32"
// CHECK-AS32: "-many"
+// Check powerpc64-ibm-aix7.1.0.0, system assembler is used for assembly files, 64-bit.
+// RUN: %clang -x assembler %s -### -c -fintegrated-as 2>&1 \
+// RUN: --target=powerpc64-ibm-aix7.1.0.0 \
+// RUN: | FileCheck --check-prefix=CHECK-AS64 %s
+//
+// RUN: %clang -x assembler %s -### -c -fno-integrated-as 2>&1 \
+// RUN: --target=powerpc64-ibm-aix7.1.0.0 \
+// RUN: | FileCheck --check-prefix=CHECK-AS64 %s
+
// 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-AS64 %s
+// RUN: | FileCheck --check-prefixes=CHECK-AS64,CHECK-AS64-CC1 %s
// CHECK-AS64-NOT: warning:
-// CHECK-AS64: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
+// CHECK-AS64-CC1: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
// CHECK-AS64: "{{.*}}as{{(.exe)?}}"
// CHECK-AS64: "-a64"
// CHECK-AS64: "-many"
Index: clang/lib/Driver/ToolChain.cpp
===================================================================
--- clang/lib/Driver/ToolChain.cpp
+++ clang/lib/Driver/ToolChain.cpp
@@ -662,7 +662,8 @@
if (D.IsFlangMode() && getDriver().ShouldUseFlangCompiler(JA)) return getFlang();
if (getDriver().ShouldUseClangCompiler(JA)) return getClang();
Action::ActionClass AC = JA.getKind();
- if (AC == Action::AssembleJobClass && useIntegratedAs())
+ if (AC == Action::AssembleJobClass && useIntegratedAs() &&
+ !getTriple().isOSAIX())
return getClangAs();
return getTool(AC);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148490.528257.patch
Type: text/x-patch
Size: 2753 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230605/6ad563f9/attachment-0001.bin>
More information about the cfe-commits
mailing list