This is an archive of the discontinued LLVM Phabricator instance.

[Clang][Driver] don't error for unsupported as options for -no-integrated-as
AbandonedPublic

Authored by nickdesaulniers on Jul 12 2019, 12:03 PM.

Details

Reviewers
rnk
Summary

The Linux kernel's assembler flag detection started failing after
r365703. It seems that Clang was erroring for -Wa, flags that it did
not support (good), but even doing so when using -no-integrated-as
(bad).

Reported-by: Nathan Chancellor <natechancellor@gmail.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/598

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJul 12 2019, 12:03 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

s/integrates/integrated in the title, but otherwise this looks good.

nickdesaulniers retitled this revision from [Clang][Driver] don't error for unsupported as options for -no-integrates-as to [Clang][Driver] don't error for unsupported as options for -no-integrated-as.Jul 12 2019, 1:10 PM
rnk added a comment.Jul 12 2019, 1:36 PM

I don't think this is the right fix, because now I think we get this behavior that we don't want:

$ clang -E t.c -o t.i -Wa,-mbig-obj
# no warning
$ clang -E t.c -o t.i -Wa,-mbig-obj -fno-integrated-as
clang: warning: argument unused during compilation: '-Wa,-mbig-obj' [-Wunused-command-line-argument]

If we can't make those behave the same, I think we should revert to fix the Linux build and silence the warning a different way.

rnk added a comment.Jul 12 2019, 1:52 PM

I reverted @thakis's change in rC365956, but I think in retrospect I should've just stamped your change. I was glazing over the "Integrated" part of "CollectArgsForIntegratedAssembler". Anyway, I think we should leave it alone and let him decide how to handle integrated and non-integrated assembly in a uniform way.

Sorry, I missed this thread (and the other one) yesterday. Thanks for sorting out my mess; I'll think about what I want to do for the reland.

I think https://reviews.llvm.org/D65108 is a better fix, for the reason rnk gave above. I think this one can be abandoned.

nickdesaulniers abandoned this revision.Jul 22 2019, 12:54 PM