59989ef
From 51b84e7bc21f8729de8d3e8f9ff08b337af33b78 Mon Sep 17 00:00:00 2001
59989ef
From: Mattias Ellert <mattias.ellert@physics.uu.se>
59989ef
Date: Fri, 17 Nov 2023 17:15:15 +0100
59989ef
Subject: [PATCH] Avoid out of memory during linking regardless of build type
59989ef
59989ef
---
59989ef
 core/metacling/src/CMakeLists.txt | 7 ++-----
59989ef
 1 file changed, 2 insertions(+), 5 deletions(-)
59989ef
59989ef
diff --git a/core/metacling/src/CMakeLists.txt b/core/metacling/src/CMakeLists.txt
59989ef
index e750480eb3..dd50793d29 100644
59989ef
--- a/core/metacling/src/CMakeLists.txt
59989ef
+++ b/core/metacling/src/CMakeLists.txt
59989ef
@@ -111,11 +111,8 @@ ROOT_LINKER_LIBRARY(Cling
59989ef
         $<TARGET_OBJECTS:MetaCling>
59989ef
         LIBRARIES ${CLING_LIBRARIES} ${LINK_LIBS} ${CLING_PLUGIN_LINK_LIBS})
59989ef
 
59989ef
-string(TOUPPER "${LLVM_BUILD_TYPE}" THE_BUILD_TYPE)
59989ef
-if("${THE_BUILD_TYPE}" STREQUAL DEBUG OR "${THE_BUILD_TYPE}" STREQUAL RELWITHDEBINFO)
59989ef
-  # When these two link at the same time, they can exhaust the RAM on many machines, since they both link against llvm.
59989ef
-  add_dependencies(Cling rootcling_stage1)
59989ef
-endif()
59989ef
+# When these two link at the same time, they can exhaust the RAM on many machines, since they both link against llvm.
59989ef
+add_dependencies(Cling rootcling_stage1)
59989ef
 
59989ef
 if(MSVC)
59989ef
   set_target_properties(Cling PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
59989ef
-- 
59989ef
2.43.0
59989ef