[PATCH] D148490: [AIX] use system assembler for assembly files
ChenZheng via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 11 02:31:49 PDT 2023
shchenz updated this revision to Diff 521233.
shchenz added a comment.
update tests
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/target-as.s
Index: clang/test/Driver/target-as.s
===================================================================
--- clang/test/Driver/target-as.s
+++ clang/test/Driver/target-as.s
@@ -1,6 +1,29 @@
// Make sure the -march is passed down to cc1as.
// RUN: %clang -target i386-unknown-freebsd -### -c -integrated-as %s \
-// RUN: -march=geode 2>&1 | FileCheck -check-prefix=TARGET %s
+// RUN: -march=geode 2>&1 | FileCheck -check-prefix=GEODE %s
+
+// Check powerpc64-ibm-aix7.1.0.0, 64-bit.
+// RUN: %clang %s -### -c -fintegrated-as 2>&1 \
+// RUN: --target=powerpc64-ibm-aix7.1.0.0 \
+// RUN: | FileCheck --check-prefixes=AIX-AS64,CHECK %s
//
-// TARGET: "-cc1as"
-// TARGET: "-target-cpu" "geode"
+// RUN: %clang %s -### -c -fno-integrated-as 2>&1 \
+// RUN: --target=powerpc64-ibm-aix7.1.0.0 \
+// RUN: | FileCheck --check-prefixes=AIX-AS64,CHECK %s
+
+// Check powerpc-ibm-aix7.1.0.0, 32-bit.
+// RUN: %clang %s -### -c -fintegrated-as 2>&1 \
+// RUN: --target=powerpc-ibm-aix7.1.0.0 \
+// RUN: | FileCheck --check-prefixes=AIX-AS32,CHECK %s
+//
+// RUN: %clang %s -### -c 2>&1 -fno-integrated-as \
+// RUN: --target=powerpc-ibm-aix7.1.0.0 \
+// RUN: | FileCheck --check-prefixes=AIX-AS32,CHECK %s
+
+// GEODE: "-cc1as"
+// GEODE: "-target-cpu" "geode"
+
+// CHECK: "{{.*}}as{{(.exe)?}}"
+// AIX-AS32: "-a32"
+// AIX-AS64: "-a64"
+// CHECK: "-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.521233.patch
Type: text/x-patch
Size: 1982 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230511/e821c5a7/attachment.bin>
More information about the cfe-commits
mailing list