[libcxx-commits] [PATCH] D125715: [runtimes] Default LIB*_HERMETIC_STATIC_LIBRARY to ON on Windows
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon May 16 11:45:15 PDT 2022
mstorsjo created this revision.
mstorsjo added reviewers: ldionne, phosek.
Herald added a subscriber: mgorny.
Herald added projects: libunwind, All.
Herald added a reviewer: libunwind.
mstorsjo requested review of this revision.
Herald added projects: libc++, libc++abi.
Herald added a reviewer: libc++.
Herald added a reviewer: libc++abi.
(In the case of libunwind, the cmake option is called
LIBUNWIND_HIDE_SYMBOLS, but it has the same effect as
LIBCXX_HERMETIC_STATIC_LIBRARY and
LIBCXXABI_HERMETIC_STATIC_LIBRARY.)
Previously, the same issue was dealt with by setting a project wide
define (_LIBUNWIND_HIDE_SYMBOLS,
_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS and
_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) if only building a static
library. If building both static and shared at the same time, this
wasn't set, and the static library would contain dllexport directives.
The LIB*_HERMETIC_STATIC_LIBRARY and LIBUNWIND_HIDE_SYMBOLS cmake
options only apply the defines to the static library in the build,
even if building both static and shared at the same time.
(This could only be done use after the object libraries were
enabled, as a shared libcxx needs libcxxabi object files built
with dllexports included.)
This allows removing inelegant code for deciding how to build the
libcxxabi static library and a TODO comment that suggested that
users should need to start setting an option, which they shouldn't
need to. Finally, this gets rid of two XFAILs in tests.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D125715
Files:
libcxx/CMakeLists.txt
libcxx/src/CMakeLists.txt
libcxx/test/libcxx/vendor/clang-cl/static-lib-exports.sh.cpp
libcxx/test/libcxx/vendor/mingw/static-lib-exports.sh.cpp
libcxxabi/CMakeLists.txt
libcxxabi/src/CMakeLists.txt
libunwind/CMakeLists.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125715.429802.patch
Type: text/x-patch
Size: 6584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220516/7a26a197/attachment.bin>
More information about the libcxx-commits
mailing list