Skip to content

Cling visibility and semantic interposition v624#8258

Merged
Axel-Naumann merged 8 commits intoroot-project:v6-24-00-patchesfrom
Axel-Naumann:cling-visibility-semantic-interpos-v624
May 31, 2021
Merged

Cling visibility and semantic interposition v624#8258
Axel-Naumann merged 8 commits intoroot-project:v6-24-00-patchesfrom
Axel-Naumann:cling-visibility-semantic-interpos-v624

Conversation

@Axel-Naumann
Copy link
Copy Markdown
Member

@Axel-Naumann Axel-Naumann commented May 27, 2021

Backport of #8204 and #8244

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.
@Axel-Naumann Axel-Naumann added this to the 6.24/02 milestone May 27, 2021
@Axel-Naumann Axel-Naumann self-assigned this May 27, 2021
@Axel-Naumann Axel-Naumann requested a review from oshadura as a code owner May 27, 2021 08:35
@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-fedora32/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

GCC 4.8 (which we support...) does not have __has_attribute. Fixes CentOS7 builds.
@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-fedora32/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Copy Markdown

@Axel-Naumann Axel-Naumann merged commit 59ae4a6 into root-project:v6-24-00-patches May 31, 2021
@Axel-Naumann Axel-Naumann deleted the cling-visibility-semantic-interpos-v624 branch May 31, 2021 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ROOT 6.24 breaks Alice O2 due to symbol confusion with system llvm 11

2 participants