From f11aa5c1c9878b79e9173722a0eee64c1f0ef20f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?No=C3=AFc=20Crouzet?= <noic.crouzet@irit.fr>
Date: Mon, 14 Oct 2024 14:03:11 +0200
Subject: [PATCH] Do not build libcxx for vortex

---
 RV_preload.cmake | 21 ++-------------------
 1 file changed, 2 insertions(+), 19 deletions(-)

diff --git a/RV_preload.cmake b/RV_preload.cmake
index 819ef12f31d8..9efcefb416ed 100644
--- a/RV_preload.cmake
+++ b/RV_preload.cmake
@@ -18,7 +18,7 @@ set(LLVM_CCACHE_BUILD ON CACHE BOOL "")
 
 set(LLVM_TARGETS_TO_BUILD RISCV CACHE STRING "")
 set(LLVM_ENABLE_PROJECTS "clang;lld;libc" CACHE STRING "")
-set(LLVM_ENABLE_RUNTIMES "libc;libcxx;compiler-rt" CACHE STRING "")
+set(LLVM_ENABLE_RUNTIMES "libc;compiler-rt" CACHE STRING "")
 set(COMPILER_RT_BAREMETAL_BUILD ON CACHE BOOL "")
 
 set(LLVM_LIBC_FULL_BUILD ON CACHE BOOL "")
@@ -65,7 +65,7 @@ foreach (xlen ${RV_XLEN})
         set(RUNTIMES_${target}_CMAKE_SYSTEM_PROCESSOR           RISCV CACHE STRING "")
         set(RUNTIMES_${target}_CMAKE_SYSROOT                    "" CACHE STRING "")
 
-        set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES             "libc;libcxx" CACHE STRING "only build libc during runtime (builtins is already built")
+        set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES             "libc" CACHE STRING "only build libc during runtime (builtins is already built")
         set(RUNTIMES_${target}_COMPILER_RT_USE_BUILTINS_LIBRARY OFF CACHE BOOL "")
         set(RUNTIMES_${target}_COMPILER_RT_BUILD_SANITIZERS     OFF CACHE BOOL "")
         set(RUNTIMES_${target}_COMPILER_RT_INCLUDE_TESTS        OFF CACHE BOOL "")
@@ -80,23 +80,6 @@ foreach (xlen ${RV_XLEN})
         set(RUNTIMES_${target}_LIBC_HDRGEN_ONLY OFF CACHE BOOL "Ensure that we do not generate HDRGEN (it would be cross compiled)")
         set(RUNTIMES_${target}_LIBC_HDRGEN_EXE "${GENERATED_LIBC_HDRGEN_EXE}" CACHE STRING "Point to where the native HDRGEN was compiled")
         #set(RUNTIMES_${target}_LIBC_COMPILE_OPTIONS_DEFAULT "-ffreestanding" CACHE STRING "")
-
-        # LIBCXX defs
-        set(RUNTIMES_${target}_LIBCXX_ENABLE_STATIC ON CACHE BOOL "")
-        set(RUNTIMES_${target}_LIBCXX_INCLUDE_TESTS OFF CACHE BOOL "")
-        set(RUNTIMES_${target}_LIBCXX_INCLUDE_BENCHMARKS OFF CACHE BOOL "")
-        set(RUNTIMES_${target}_LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
-        set(RUNTIMES_${target}_LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
-        set(RUNTIMES_${target}_LIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY ON CACHE BOOL "")
-        # LIBCXX FEATURES
-        set(RUNTIMES_${target}_LIBCXX_ENABLE_RANDOM_DEVICE OFF CACHE BOOL "")
-        set(RUNTIMES_${target}_LIBCXX_ENABLE_LOCALIZATION OFF CACHE BOOL "")
-        set(RUNTIMES_${target}_LIBCXX_ENABLE_UNICODE OFF CACHE BOOL "")
-        set(RUNTIMES_${target}_LIBCXX_ENABLE_EXCEPTIONS OFF CACHE BOOL "")
-        set(RUNTIMES_${target}_LIBCXX_ENABLE_WIDE_CHARACTERS OFF CACHE BOOL "")
-        set(RUNTIMES_${target}_LIBCXX_ENABLE_RTTI OFF CACHE BOOL "")
-        set(RUNTIMES_${target}_LIBCXX_ENABLE_THREADS OFF CACHE BOOL "")
-
     endforeach ()
 endforeach()
 
-- 
GitLab