From 64a6f00e4814ff845c0b43210a30c00fe84423ee Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 3 Nov 2022 13:52:15 +0100 Subject: [PATCH] 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..44be3a3771c43 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