Simplify visibility setting:
Rather than string-replacing visibility, use the CMake interface. Do not set visibility in the ROOT case; ROOT can handle that just fine itself. ROOT actually does *not* need visibility=default, now that the few symbols that are required for using cling (apart from clingtest) are explicitly requested through attributes.
This commit is contained in:
parent
3bd3ff18cb
commit
07c6081059
@ -290,10 +290,6 @@ if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
|
||||
endforeach ()
|
||||
endif ()
|
||||
|
||||
# Lots of cling is needed at runtime (e.g. Value, or Interpreter::Evaluate()).
|
||||
# The JIT needs to be able to resolve these symbols from cling; unhide them.
|
||||
string(REPLACE "-fvisibility=hidden" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
|
||||
# The package needs to be compiler without RTTI information
|
||||
if(MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-")
|
||||
@ -324,8 +320,11 @@ string(REGEX REPLACE "([0-9]).[0-9]+~[a-zA-Z]+" "\\1" CLING_VERSION_MAJOR ${CLIN
|
||||
string(REGEX REPLACE "[0-9].([0-9]+)~[a-zA-Z]+" "\\1" CLING_VERSION_MINOR ${CLING_VERSION})
|
||||
|
||||
if(DEFINED ROOT_BINARY_DIR)
|
||||
# Building as part of ROOT.
|
||||
# Building as part of ROOT; visibility is "inherited" from ROOT/interpreter.
|
||||
set(CLING_VERSION ROOT_${CLING_VERSION})
|
||||
else()
|
||||
# Lots of cling is needed at runtime (e.g. Value, or Interpreter::Evaluate()).
|
||||
# The JIT needs to be able to resolve these symbols from cling; unhide them.
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET default)
|
||||
set(CMAKE_C_VISIBILITY_PRESET default)
|
||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN "ON")
|
||||
|
Loading…
Reference in New Issue
Block a user