Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,17 @@ macro(add_cling_library name)
# Set DISABLE_LLVM_LINK_LLVM_DYLIB to disable linking against shared LLVM
llvm_add_library(${name} ${ARG_ENABLE_SHARED} DISABLE_LLVM_LINK_LLVM_DYLIB ${ARG_UNPARSED_ARGUMENTS} ${srcs})

# Suppress dllexport from Clang headers when building cling as static libs on MSVC.
# AddClang.cmake sets CLANG_BUILD_STATIC for clang targets, but cling targets
# (which include clang headers like Attrs.inc) miss it, causing thousands of
# __declspec(dllexport) symbols to leak into any DLL that links cling libs.
if(MSVC AND NOT CLANG_LINK_CLANG_DYLIB)
target_compile_definitions(${name} PUBLIC CLANG_BUILD_STATIC)
if(TARGET "obj.${name}")
target_compile_definitions("obj.${name}" PUBLIC CLANG_BUILD_STATIC)
endif()
endif()

if (MSVC AND cling_ex_file_match)
# /EHs because cling_runtime_internal_throwIfInvalidPointer is extern “C”
if (cling_ex_file_match)
Expand Down
4 changes: 1 addition & 3 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@

add_subdirectory(Interpreter)
add_subdirectory(MetaProcessor)
if(CLING_INCLUDE_TESTS)
add_subdirectory(UserInterface)
endif()
add_subdirectory(UserInterface)
add_subdirectory(Utils)
1 change: 1 addition & 0 deletions tools/libcling/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ set(LIBS
clangCodeGen
clangBasic
clangEdit
clangInterpreter

clingUtils
)
Expand Down