[libcxx-commits] [PATCH] D129271: [libcxx] Make LIBCXX_HERMETIC_STATIC_LIBRARY apply to libc++experimental too
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 7 13:30:22 PDT 2022
mstorsjo added inline comments.
================
Comment at: libcxx/src/CMakeLists.txt:337
+ if (LIBCXX_HERMETIC_STATIC_LIBRARY)
+ target_compile_options(cxx_experimental PRIVATE ${CXX_STATIC_LIBRARY_FLAGS})
+ # _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS can be defined in __config_site
----------------
mstorsjo wrote:
> ldionne wrote:
> > Shouldn't we always add these flags to `cxx_experimental`, i.e. not only when `LIBCXX_HERMETIC_STATIC_LIBRARY=ON`?
> Well this is how it’s done for the regular static library above, lines 295-302.
The only place `CXX_STATIC_LIBRARY_FLAGS` is set is on line 300 above, where `-fvisibility-global-new-delete-hidden` is added to the variable. But I guess that we don't need to set that at all for libc++experimental, as that library doesn't provide any new/delete operators?
I can rerun this patch in CI with the `target_compile_options(cxx_experimental PRIVATE ${CXX_STATIC_LIBRARY_FLAGS})` line omitted, as it's not needed for the case I'm fixing here anyway.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129271/new/
https://reviews.llvm.org/D129271
More information about the libcxx-commits
mailing list