From 286d96b12aad8688b9d8e4b3b5df843dcfb716a8 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Fri, 20 Jan 2023 17:46:13 +0200 Subject: [PATCH] Do not register LLVMSupport as a library when it should be a component (#11703) Do not register LLVMSupport as a library when it should be a component LLVM component must be registered as LLVM_LINK_COMPONENTS to be compatible with LLVM Dylib. Otherwise they are loaded twice in the final binary, once through LLVM Dylmib and once through individual component, and this results in some options being registered twice. Fix root-project/cling#440 --- interpreter/cling/tools/driver/CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/interpreter/cling/tools/driver/CMakeLists.txt b/interpreter/cling/tools/driver/CMakeLists.txt index 77d6a2870df0d..d107dd7d022fb 100644 --- a/interpreter/cling/tools/driver/CMakeLists.txt +++ b/interpreter/cling/tools/driver/CMakeLists.txt @@ -9,9 +9,9 @@ # Keep symbols for JIT resolution set(LLVM_NO_DEAD_STRIP 1) +set(LLVM_LINK_COMPONENTS Support) if(BUILD_SHARED_LIBS) set(LIBS - LLVMSupport clangFrontendTool @@ -25,8 +25,6 @@ if(BUILD_SHARED_LIBS) ) else() set(LIBS - LLVMSupport - clangASTMatchers clangFrontendTool