From 2b5be5f9d5a978ab309715e74b65b4b7f0381412 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 25 Jul 2024 10:43:13 +0200 Subject: [PATCH] [compiler-rt][test] Disable lld tests on SPARC As detailed in Issue #100320, a considerable number of tests that explicitly use `-fuse-ld=lld` `FAIL` on Linux/sparc64 due to several `lld` limitations (no 32-bit SPARC support, lack of support for various relocations, ...). To reduce the noise, this patch disables `COMPILER_RT_HAS_LLD` on SPARC wholesale. Tested on `sparc64-unknown-linux-gnu`. --- compiler-rt/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt index 65063e0057bbc..6b8d9a5ea46d6 100644 --- a/compiler-rt/CMakeLists.txt +++ b/compiler-rt/CMakeLists.txt @@ -801,6 +801,10 @@ if(ANDROID) append_list_if(COMPILER_RT_HAS_FUSE_LD_LLD_FLAG -fuse-ld=lld SANITIZER_COMMON_LINK_FLAGS) append_list_if(COMPILER_RT_HAS_LLD -fuse-ld=lld COMPILER_RT_UNITTEST_LINK_FLAGS) endif() +if(${COMPILER_RT_DEFAULT_TARGET_ARCH} MATCHES sparc) + # lld has several bugs/limitations on SPARC, so disable (Issue #100320). + set(COMPILER_RT_HAS_LLD FALSE) +endif() pythonize_bool(COMPILER_RT_HAS_LLD) pythonize_bool(COMPILER_RT_TEST_USE_LLD)