diff --git a/interpreter/CMakeLists.txt b/interpreter/CMakeLists.txt index 8f9b36c07cb23..63bbef98f8b4f 100644 --- a/interpreter/CMakeLists.txt +++ b/interpreter/CMakeLists.txt @@ -132,6 +132,12 @@ else() set(CMAKE_C_VISIBILITY_PRESET hidden) endif() if (NOT MSVC AND NOT APPLE) + # Requires the linker to resolve the symbol internally and prevents + # conflicts when linked with another software using also LLVM like in + # the problem reported for Julia in + # https://github.com/JuliaHEP/ROOT.jl/issues/17#issuecomment-882719292 + # Only needed for Linux: Mac uses linker namespaces and Windows explicit export/import + string(APPEND CMAKE_SHARED_LINKER_FLAGS " -Wl,-Bsymbolic") ROOT_ADD_CXX_FLAG(CMAKE_CXX_FLAGS "-fno-semantic-interposition") endif() set(CMAKE_VISIBILITY_INLINES_HIDDEN "ON")