aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Driver/ToolChainTest.cpp
diff options
context:
space:
mode:
authorQuinn Pham <Quinn.Pham@ibm.com>2022-06-08 10:03:11 -0500
committerQuinn Pham <Quinn.Pham@ibm.com>2022-06-13 09:12:49 -0500
commit35aaf548237a4f213ba9d95de53b33c5ce1eadce (patch)
tree0d838571703abd37b8910499606d8f5fb7a66d43 /clang/unittests/Driver/ToolChainTest.cpp
parente9bf76675d8260bb4feebb12ca353b56ca7f9623 (diff)
downloadllvm-35aaf548237a4f213ba9d95de53b33c5ce1eadce.zip
llvm-35aaf548237a4f213ba9d95de53b33c5ce1eadce.tar.gz
llvm-35aaf548237a4f213ba9d95de53b33c5ce1eadce.tar.bz2
[clang][driver] fix to correctly set devtoolset on RHEL
This patch correctly sets the devtoolset on RHEL. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D127310
Diffstat (limited to 'clang/unittests/Driver/ToolChainTest.cpp')
-rw-r--r--clang/unittests/Driver/ToolChainTest.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/clang/unittests/Driver/ToolChainTest.cpp b/clang/unittests/Driver/ToolChainTest.cpp
index 33389a5..3637b10 100644
--- a/clang/unittests/Driver/ToolChainTest.cpp
+++ b/clang/unittests/Driver/ToolChainTest.cpp
@@ -587,9 +587,9 @@ TEST(ToolChainTest, Toolsets) {
llvm::MemoryBuffer::getMemBuffer("\n"));
// File needed for GCC installation detection.
- InMemoryFileSystem->addFile(
- "/opt/rh/gcc-toolset-12/lib/gcc/x86_64-redhat-linux/11/crtbegin.o", 0,
- llvm::MemoryBuffer::getMemBuffer("\n"));
+ InMemoryFileSystem->addFile("/opt/rh/gcc-toolset-12/root/usr/lib/gcc/"
+ "x86_64-redhat-linux/11/crtbegin.o",
+ 0, llvm::MemoryBuffer::getMemBuffer("\n"));
DiagnosticsEngine Diags(DiagID, &*DiagOpts, new SimpleDiagnosticConsumer);
Driver TheDriver("/bin/clang", "x86_64-redhat-linux", Diags,
@@ -603,9 +603,9 @@ TEST(ToolChainTest, Toolsets) {
C->getDefaultToolChain().printVerboseInfo(OS);
}
EXPECT_EQ("Found candidate GCC installation: "
- "/opt/rh/gcc-toolset-12/lib/gcc/x86_64-redhat-linux/11\n"
+ "/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/11\n"
"Selected GCC installation: "
- "/opt/rh/gcc-toolset-12/lib/gcc/x86_64-redhat-linux/11\n"
+ "/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/11\n"
"Candidate multilib: .;@m64\n"
"Selected multilib: .;@m64\n",
S);
@@ -627,9 +627,9 @@ TEST(ToolChainTest, Toolsets) {
llvm::MemoryBuffer::getMemBuffer("\n"));
// File needed for GCC installation detection.
- InMemoryFileSystem->addFile(
- "/opt/rh/devtoolset-12/lib/gcc/x86_64-redhat-linux/11/crtbegin.o", 0,
- llvm::MemoryBuffer::getMemBuffer("\n"));
+ InMemoryFileSystem->addFile("/opt/rh/devtoolset-12/root/usr/lib/gcc/"
+ "x86_64-redhat-linux/11/crtbegin.o",
+ 0, llvm::MemoryBuffer::getMemBuffer("\n"));
DiagnosticsEngine Diags(DiagID, &*DiagOpts, new SimpleDiagnosticConsumer);
Driver TheDriver("/bin/clang", "x86_64-redhat-linux", Diags,
@@ -643,9 +643,9 @@ TEST(ToolChainTest, Toolsets) {
C->getDefaultToolChain().printVerboseInfo(OS);
}
EXPECT_EQ("Found candidate GCC installation: "
- "/opt/rh/devtoolset-12/lib/gcc/x86_64-redhat-linux/11\n"
+ "/opt/rh/devtoolset-12/root/usr/lib/gcc/x86_64-redhat-linux/11\n"
"Selected GCC installation: "
- "/opt/rh/devtoolset-12/lib/gcc/x86_64-redhat-linux/11\n"
+ "/opt/rh/devtoolset-12/root/usr/lib/gcc/x86_64-redhat-linux/11\n"
"Candidate multilib: .;@m64\n"
"Selected multilib: .;@m64\n",
S);