Cling visibility and semantic interposition v624#8258
Merged
Axel-Naumann merged 8 commits intoroot-project:v6-24-00-patchesfrom May 31, 2021
Merged
Conversation
and use a standard mechanism that plays well with -fvisibility. Given that several symbols now use declspec(dllexport), remove them from the ad-hoc cling_exports in ROOT's CMakeLists.txt.
For ROOT, all of llvm, clang, and cling want CMAKE_VISIBILITY_INLINES_HIDDEN, so move it here, and use the CMake interface instead of passing a CXX_FLAG.
Instead of relying on CLING_CXXFLAGS to collect as needed, set the visbility explicitly, and use target_properties instead of CMAKE_CXXFLAGS.
To prevent non-ROOT LLVM-libraries from replacing the symbols cling needs (with possible version mismatches), tell GCC to just always resolve calls to dynamic symbols to symbols from libCling itself.
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.
|
Starting build on |
GCC 4.8 (which we support...) does not have __has_attribute. Fixes CentOS7 builds.
|
Starting build on |
|
Build failed on ROOT-fedora32/noimt. Failing tests: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #8204 and #8244