[llvm-branch-commits] [clang] 9bf7ca2 - [RISCV] Fix sysroot tests without GCC on RISC-V hosts with GCC
Tom Stellard via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jun 25 23:05:43 PDT 2020
Author: Luís Marques
Date: 2020-06-25T16:13:53-07:00
New Revision: 9bf7ca2c92a8c78129e503956cc4c6e9db13bec5
URL: https://github.com/llvm/llvm-project/commit/9bf7ca2c92a8c78129e503956cc4c6e9db13bec5
DIFF: https://github.com/llvm/llvm-project/commit/9bf7ca2c92a8c78129e503956cc4c6e9db13bec5.diff
LOG: [RISCV] Fix sysroot tests without GCC on RISC-V hosts with GCC
D68391 added tests that check scenarios where no RISC-V GCC toolchain is
supposed to be detected. When running the tests on RISC-V hosts the system's
GCC toolchain will be detected, and the tests will fail. This patch adds a
`--gcc-toolchain` option pointing to a path where no GCC toolchain is
present, ensuring that the tests are run under the expected conditions, and
therefore are able to pass in all test environments.
Differential Revision: https://reviews.llvm.org/D75061
(cherry picked from commit 91f7f0d8e3ef2b6be07bc9621de075ff11c730c9)
Added:
Modified:
clang/test/Driver/riscv32-toolchain-extra.c
clang/test/Driver/riscv64-toolchain-extra.c
Removed:
################################################################################
diff --git a/clang/test/Driver/riscv32-toolchain-extra.c b/clang/test/Driver/riscv32-toolchain-extra.c
index ad3974bd9c78..ff9842b37c02 100644
--- a/clang/test/Driver/riscv32-toolchain-extra.c
+++ b/clang/test/Driver/riscv32-toolchain-extra.c
@@ -19,6 +19,7 @@
// RUN: ln -s %S/Inputs/basic_riscv32_nogcc_tree/bin/riscv32-unknown-elf-ld %T/testroot-riscv32-baremetal-nogcc/bin/riscv32-unknown-elf-ld
// RUN: ln -s %S/Inputs/basic_riscv32_nogcc_tree/riscv32-unknown-elf %T/testroot-riscv32-baremetal-nogcc/riscv32-unknown-elf
// RUN: %T/testroot-riscv32-baremetal-nogcc/bin/clang %s -### -no-canonical-prefixes \
+// RUN: --gcc-toolchain=%T/testroot-riscv32-baremetal-nogcc/invalid \
// RUN: -target riscv32-unknown-elf --rtlib=platform 2>&1 \
// RUN: | FileCheck -check-prefix=C-RV32-BAREMETAL-ILP32-NOGCC %s
diff --git a/clang/test/Driver/riscv64-toolchain-extra.c b/clang/test/Driver/riscv64-toolchain-extra.c
index 2213d96456ec..6b474e88f473 100644
--- a/clang/test/Driver/riscv64-toolchain-extra.c
+++ b/clang/test/Driver/riscv64-toolchain-extra.c
@@ -19,6 +19,7 @@
// RUN: ln -s %S/Inputs/basic_riscv64_nogcc_tree/bin/riscv64-unknown-elf-ld %T/testroot-riscv64-baremetal-nogcc/bin/riscv64-unknown-elf-ld
// RUN: ln -s %S/Inputs/basic_riscv64_nogcc_tree/riscv64-unknown-elf %T/testroot-riscv64-baremetal-nogcc/riscv64-unknown-elf
// RUN: %T/testroot-riscv64-baremetal-nogcc/bin/clang %s -### -no-canonical-prefixes \
+// RUN: --gcc-toolchain=%T/testroot-riscv64-baremetal-nogcc/invalid \
// RUN: -target riscv64-unknown-elf --rtlib=platform 2>&1 \
// RUN: | FileCheck -check-prefix=C-RV64-BAREMETAL-LP64-NOGCC %s
More information about the llvm-branch-commits
mailing list