This is an archive of the discontinued LLVM Phabricator instance.

Enabling the detection of devtoolset-11 toolchain.
ClosedPublic

Authored by kamaub on May 12 2022, 1:18 PM.

Details

Summary

This patch allows systems to build the llvm-project with the devtoolset-11
toolchain.

Diff Detail

Event Timeline

kamaub created this revision.May 12 2022, 1:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 12 2022, 1:18 PM
kamaub requested review of this revision.May 12 2022, 1:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 12 2022, 1:18 PM
phosek accepted this revision.May 12 2022, 4:49 PM

LGTM

This revision is now accepted and ready to land.May 12 2022, 4:49 PM
tstellar added inline comments.May 12 2022, 4:50 PM
clang/lib/Driver/ToolChains/Gnu.cpp
2154

Can you also add gcc-toolset-11 to the search paths?

MaskRay added inline comments.May 12 2022, 4:59 PM
clang/lib/Driver/ToolChains/Gnu.cpp
2156

The detection is wasted every Linux user (even if they don't use RedHat/Fedora). Some may need to be refactored to detect /opt/rh first. Some ancient devtoolset-* may be deleted now.

This revision was automatically updated to reflect the committed changes.
tstellar added inline comments.May 17 2022, 8:14 AM
clang/lib/Driver/ToolChains/Gnu.cpp
2156

@kamaub Are you planning to address these comments in a follow up change?

I'm curious what is your system configuration where this patch actually allows for detection of devtoolset? I noticed that if clang and gcc are both installed to /usr/, then driver will pick the gcc in /usr/ over the one in /opt/rh/.../

I'm curious what is your system configuration where this patch actually allows for detection of devtoolset? I noticed that if clang and gcc are both installed to /usr/, then driver will pick the gcc in /usr/ over the one in /opt/rh/.../

The machine I needed the devtoolset-11 path for is not the same as the current bot failure trying to be addressed in https://reviews.llvm.org/D127310 but all there isn'y anything special to the configuration, I have /opt/rh/devtoolset-11/root/usr installed as normal from the yum repositories and I had a check-all build failure without this patch

~/Github/build $ ninja check-all
[25/1032] Generating ScudoUnitTestsObjects.wrappers_cpp_test.cpp.powerpc64.o
FAILED: projects/compiler-rt/lib/scudo/standalone/tests/ScudoUnitTestsObjects.wrappers_cpp_test.cpp.powerpc64.o
cd /home/kamaub/Github/build/projects/compiler-rt/lib/scudo/standalone/tests && /home/kamaub/Github/build/./bin/clang -g -Wno-suggest-override -DGTEST_NO_LLVM_SUPPORT=1 -DGTEST_HAS_RTTI=0 -I/home/kamaub/Github/llvm-project/llvm/utils/unittest/googletest/include -I/home/kamaub/Github/llvm-project/llvm/utils/unittest/googletest -I/home/kamaub/Github/llvm-project/compiler-rt/include -I/home/kamaub/Github/llvm-project/compiler-rt/lib -I/home/kamaub/Github/llvm-project/compiler-rt/lib/scudo/standalone -I/home/kamaub/Github/llvm-project/compiler-rt/lib/scudo/standalone/include -DGTEST_HAS_RTTI=0 -g -Wno-mismatched-new-delete -m64 -c -o ScudoUnitTestsObjects.wrappers_cpp_test.cpp.powerpc64.o /home/kamaub/Github/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp
/home/kamaub/Github/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp:118:19: error: no member named 'make_unique' in namespace 'std'
    NoTags = std::make_unique<scudo::ScopedDisableMemoryTagChecks>();
             ~~~~~^
/home/kamaub/Github/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp:118:66: error: expected '(' for function-style cast or type construction
    NoTags = std::make_unique<scudo::ScopedDisableMemoryTagChecks>();
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/home/kamaub/Github/llvm-project/compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp:118:68: error: expected expression
    NoTags = std::make_unique<scudo::ScopedDisableMemoryTagChecks>();
                                                                   ^
3 errors generated.
clang/lib/Driver/ToolChains/Gnu.cpp
2156

@tstellar Sorry I missed this, thank you for pointing it out, I should have addressed this in a follow-up chain but I email notifications are not working as only saw these comment while taking a look at https://reviews.llvm.org/D127310