[PATCH] D64527: driver: Don't warn about assembler flags being unused when not assembling

Nick Desaulniers via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 11 18:23:05 PDT 2019


Yes, the current behavior is erroring for assembler flags clang does not
recognize, which is irrelevant when compiling with `-no-integrated-as`,
which is breaking our assembler flag feature detection in building the
Linux kernel.

On Thu, Jul 11, 2019, 6:09 PM Reid Kleckner via Phabricator <
reviews at reviews.llvm.org> wrote:

> rnk added a comment.
>
> I think the intention of this change was to ignore assembler flags in
> pre-processing actions without warning about them. It implements that
> behavior by running the code that gathers and validates assembler flags.
> The validation is whats emitting the problematic errors. I don't think
> that's desirable, so I'd recommend reverting for now.
>
>
>
> ================
> Comment at: cfe/trunk/lib/Driver/ToolChains/Clang.cpp:3555
> +  // in -E mode either for example, even though it's not really used
> either.
> +  if (!isa<AssembleJobAction>(JA)) {
> +    ArgStringList DummyArgs;
> ----------------
> nickdesaulniers wrote:
> > Should you be checking `!TC.IsIntegratedAssemblerDefault()` additionally?
> I don't think so. We want to ignore assembler flags in a preprocessor
> action even if we're not going to use the integrated assembler.
>
>
> Repository:
>   rL LLVM
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D64527/new/
>
> https://reviews.llvm.org/D64527
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190711/501245ad/attachment.html>


More information about the llvm-commits mailing list