[PATCH] D152924: [libLTO][AIX] Respect `-f[no]-integrated-as` on AIX

Qiongsi Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 16 11:12:01 PDT 2023


qiongsiwu1 marked an inline comment as done.
qiongsiwu1 added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:703
+    Arg *A = Args.getLastArgNoClaim(options::OPT_fno_integrated_as);
+    D.Diag(diag::warn_drv_unsupported_lto_option_for_target)
+        << A->getSpelling() << ToolChain.getTriple().getTriple();
----------------
MaskRay wrote:
> qiongsiwu1 wrote:
> > MaskRay wrote:
> > > The patch is titled AIX but this would change the Linux behavior. In my experience this diagnostic is not useful.
> > Yes I agree the title is a bit misleading. The warning is added because the behaviour of `-fno-integrated-as` changes with and without `-flto`. Without `-flto`, `clang` does create the job to invoke system assembler, and with `-flto`, currently `clang` silently ignores the `-fno-integrated-as` option (without this patch). I felt that was unexpected, hence I added the warning. I am happy to remove the warning if the community thinks that silently ignoring the option is acceptable. 
> > 
> > The limitation of this diagnostic is that it goes through `clang` and there is nothing in the backend guarding against using `-no-integrated-as` directly through `-plugin-opt` on Linux, which will be ignored. @MaskRay is this something we should worry about? If not, I will not try looking for a place to add the warning in the backend.
> > 
> > Thanks! 
> I do not worry about LTO ignoring `-fno-integrated-as` on Linux/*BSD targets. The use cases are very limited and the primary user (Linux kernel community) knows this.
> 
> Actually the link action ignores compilation-affected options anyway (all `CompileOnly_option`).
Thanks! The diagnostic is removed. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152924



More information about the cfe-commits mailing list