[PATCH] D69620: Add AIX assembler support

Xiangling Liao via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 15 10:06:03 PST 2019


Xiangling_L added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/AIX.cpp:28
+                                  const char *LinkingOutput) const {
+  claimNoWarnArgs(Args);
+  ArgStringList CmdArgs;
----------------
The definition of `claimNoWarnArgs` is to suppress warnings for some options if they are unused, can you explain a little bit about how did you figure out that we don't want warnings for those?

Some context of `claimNoWarnArgs`:

```
// Claim options we don't want to warn if they are unused. We do this for
// options that build systems might add but are unused when assembling or only
// running the preprocessor for example.
void tools::claimNoWarnArgs(const ArgList &Args) {
  // Don't warn about unused -f(no-)?lto.  This can happen when we're
  // preprocessing, precompiling or assembling.
  Args.ClaimAllArgs(options::OPT_flto_EQ);
  Args.ClaimAllArgs(options::OPT_flto);
  Args.ClaimAllArgs(options::OPT_fno_lto);
}
```



================
Comment at: clang/lib/Driver/ToolChains/AIX.cpp:45
+  // Acccept any mixture of instructions.
+  CmdArgs.push_back("-many");
+
----------------
GCC invokes system assembler also with options `-mpwr4` and `-u`, I think you need to verify that do we need those? And as far as I can recall, `-mpwr4` is to pick up new version AIX instruction set, and `-u` is to suppress warning for undefined symbols. 90% sure that we need `-mpwr4`(I could be wrong), but not sure about `-u`.


================
Comment at: clang/lib/Driver/ToolChains/AIX.h:26
+
+  bool hasIntegratedCPP() const override { return false; }
+
----------------
I saw a lot of other target also set `hasIntegratedCPP()` as false, but I didn't find any explanation in documentation, so I am curious that what this is about?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69620





More information about the cfe-commits mailing list