From 26fb312957a13d4bcc40d95b0bbf503c5bada1d6 Mon Sep 17 00:00:00 2001 From: laokz Date: Fri, 1 Mar 2024 06:05:27 +0000 Subject: [PATCH 1/2] Add riscv64 to os-triple Signed-off-by: laokz --- clang/lib/Driver/ToolChains/Gnu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp index 40038dce47d8..0bb5433a658a 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -2404,7 +2404,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( static const char *const RISCV64LibDirs[] = {"/lib64", "/lib"}; static const char *const RISCV64Triples[] = {"riscv64-unknown-linux-gnu", "riscv64-linux-gnu", - "riscv64-unknown-elf"}; + "riscv64-unknown-elf", "riscv64-openEuler-linux"}; static const char *const SPARCv8LibDirs[] = {"/lib32", "/lib"}; static const char *const SPARCv8Triples[] = {"sparc-linux-gnu", -- Gitee From 8943c1fb16c225f056e93c3a9a1bbeb535370e4e Mon Sep 17 00:00:00 2001 From: laokz Date: Fri, 1 Mar 2024 06:14:24 +0000 Subject: [PATCH 2/2] [backport] Disable InterpreterExceptionTest on RISC-V Reference: https://github.com/llvm/llvm-project/commit/ca003ee06d0eac7e8facc179181298a05e4d03ed Signed-off-by: laokz --- From ca003ee06d0eac7e8facc179181298a05e4d03ed Mon Sep 17 00:00:00 2001 From: Alex Bradbury Date: Wed, 4 Oct 2023 14:33:31 +0100 Subject: [PATCH] [clang-repl] Disable InterpreterExceptionTest on RISC-V (#68216) This test fails as .eh_frame handling is not yet implemented for RISC-V in JITLink. #66067 is proposed to address this. Skip the test until the issue is resolved. It seems that D159167 enabled this test for more than just ppc64. As the test always failed, it just wasn't run until now, I think skipping is the correct interim approach (as is already done for Arm, Darwin, and others). --- .../Interpreter/ExceptionTests/InterpreterExceptionTest.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp b/clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp index 70e10b1e53bd..3857b75598e3 100644 --- a/clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp +++ b/clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp @@ -114,6 +114,11 @@ extern "C" int throw_exception() { Triple.getArch() == llvm::Triple::aarch64_32)) GTEST_SKIP(); + // FIXME: RISC-V fails as .eh_frame handling is not yet implemented in + // JITLink for RISC-V. See PR #66067. + if (Triple.isRISCV()) + GTEST_SKIP(); + llvm::cantFail(Interp->ParseAndExecute(ExceptionCode)); testing::internal::CaptureStdout(); auto ThrowException = -- Gitee