This is an archive of the discontinued LLVM Phabricator instance.

[clang] [Distro] Support detecting Gentoo
ClosedPublic

Authored by mgorny on Dec 21 2018, 2:11 PM.

Details

Summary

Add support for distinguishing plain Gentoo distribution, and a unit
test for it. This is going to be used to introduce distro-specific
customizations in the driver code; most notably, it is going to be used
to disable -faddrsig.

Diff Detail

Event Timeline

mgorny created this revision.Dec 21 2018, 2:11 PM
phosek accepted this revision.Dec 21 2018, 2:16 PM

LGTM

include/clang/Driver/Distro.h
118

Shall we also introduce the IsGentoo() predicate for convenience?

This revision is now accepted and ready to land.Dec 21 2018, 2:16 PM
mgorny marked an inline comment as done.Dec 22 2018, 12:20 AM
mgorny added inline comments.
include/clang/Driver/Distro.h
118

Hmm, I originally thought they only make sense when there's 1+ distro value for it. But I guess more distros are doing it for some reason.

mgorny updated this revision to Diff 179413.Dec 22 2018, 12:29 AM

Now with IsGentoo() predicate.

mgorny marked an inline comment as done.Dec 22 2018, 12:29 AM
This revision was automatically updated to reflect the committed changes.