[PATCH] D100350: [AIX] Diagnose thinLTO usage in clang on AIX.
wael yehia via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 19 09:40:15 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG369c0e0f48dd: [AIX] Diagnose thinLTO usage in clang on AIX. (authored by w2yehia).
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100350/new/
https://reviews.llvm.org/D100350
Files:
clang/lib/Driver/Driver.cpp
clang/test/Driver/aix-unsupported-features.c
Index: clang/test/Driver/aix-unsupported-features.c
===================================================================
--- /dev/null
+++ clang/test/Driver/aix-unsupported-features.c
@@ -0,0 +1,7 @@
+// RUN: %clang -target powerpc-ibm-aix-xcoff -### -flto=thin 2>&1 %s | \
+// RUN: FileCheck --check-prefix=CHECKTHINLTO %s
+// RUN: %clang -target powerpc64-ibm-aix-xcoff -### -flto=thin 2>&1 %s | \
+// RUN: FileCheck --check-prefix=CHECKTHINLTO %s
+
+// CHECKTHINLTO: error: the clang compiler does not support 'thinLTO on AIX'
+
Index: clang/lib/Driver/Driver.cpp
===================================================================
--- clang/lib/Driver/Driver.cpp
+++ clang/lib/Driver/Driver.cpp
@@ -3998,10 +3998,13 @@
}
const llvm::Triple &RawTriple = C.getDefaultToolChain().getTriple();
- if (RawTriple.isOSAIX())
+ if (RawTriple.isOSAIX()) {
if (Arg *A = C.getArgs().getLastArg(options::OPT_G))
Diag(diag::err_drv_unsupported_opt_for_target)
<< A->getSpelling() << RawTriple.str();
+ if (LTOMode == LTOK_Thin)
+ Diag(diag::err_drv_clang_unsupported) << "thinLTO on AIX";
+ }
// Collect the list of architectures.
llvm::StringSet<> ArchNames;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100350.338544.patch
Type: text/x-patch
Size: 1203 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210419/3cc6b826/attachment.bin>
More information about the cfe-commits
mailing list