[PATCH] D71627: [Clang FE, SystemZ] Recognize -mrecord-mcount CL option.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 21 22:34:55 PST 2019


MaskRay added a comment.

In D71627#1794089 <https://reviews.llvm.org/D71627#1794089>, @nathanchance wrote:

> In D71627#1793142 <https://reviews.llvm.org/D71627#1793142>, @jonpa wrote:
>
> > In D71627#1793006 <https://reviews.llvm.org/D71627#1793006>, @nickdesaulniers wrote:
> >
> > > This is regressing linux kernel builds for multiple architectures.  The linux kernel uses feature detection for compiler flags, basically invoking:
> > >
> > >   $ clang -mrecord-mcount -target aarch64-linux-gnu -c -x c /dev/null
> > >
> > >
> > > Because the target info isn't validated until code gen, the above returns `0`, which seems like the flag is supported, so it is used for further compilations which then do fail.
> >
> >
> > I am not sure how this should be handled... Maybe you could open an issue on Bugzilla and add the right people on the CC list (I am not sure exactly who they would be...)?
>
>
> While that is discussed, I think this commit should be reverted. All working Linux kernel `allyesconfig` builds with Clang are now broken with this commit because of what Nick pointed out (`-mrecord-mcount` gets added to the list of CFLAGS then the build fails when actual code generation starts).


I noticed this problem as well. I will try fixing it..


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

https://reviews.llvm.org/D71627





More information about the llvm-commits mailing list