[PATCH] D106688: [AIX] Pass the -b option to linker on AIX
Zarko Todorovski via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 27 14:17:13 PDT 2021
ZarkoCA added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:262-269
+ if (T.isOSAIX()) {
+ // Pass -b prefix for AIX linker.
+ A.claim();
+ A.render(Args, CmdArgs);
+ continue;
+ } else {
+ TC.getDriver().Diag(diag::err_drv_unsupported_opt)
----------------
Can this be reversed so the error check is first for `(!T.isOSAIX())` instead? Then you don't need the `else`.
================
Comment at: clang/test/Driver/Xlinker-args.c:15-16
+
+// RUN: %clang -target powerpc-unknown-aix -### \
+// RUN: -b one %s 2> %t
+// RUN: FileCheck -check-prefix=AIX < %t %s
----------------
Does this mean that we need space between `-b` and the linker option when using clang normally? Or this an artifact of the way we need to write tests?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106688/new/
https://reviews.llvm.org/D106688
More information about the cfe-commits
mailing list