This is an archive of the discontinued LLVM Phabricator instance.

Driver: Don't mix system tools with devtoolset tools on RHEL
ClosedPublic

Authored by tstellar on Jun 29 2017, 4:59 PM.

Details

Summary

On RHEL, devtoolset provides a more up-to-date toolchain than the base
install, and we want to make sure all the tools use are from the same
toolchain.

Diff Detail

Repository
rL LLVM

Event Timeline

tstellar created this revision.Jun 29 2017, 4:59 PM
bruno added a subscriber: bruno.Mar 23 2018, 5:02 PM

Is there a way to test this?

lib/Driver/ToolChains/Linux.cpp
220 ↗(On Diff #104779)

You can remove the curly braces here.

tstellar updated this revision to Diff 142294.Apr 12 2018, 4:12 PM

Replaced the if (Distro.isRedhat()) check with a string compare on the
GCC installation lib. This narrows the scope of the fix and also makes
it possible to write a test case. The code that detects distros ignores
sysroot and looks in /etc of the test system, which makes it impossible to
write a portable lit test to verify distro specific behavior.

bruno accepted this revision.May 1 2018, 3:20 PM

LGTM, thanks!

This revision is now accepted and ready to land.May 1 2018, 3:20 PM
This revision was automatically updated to reflect the committed changes.