[libcxx-commits] [PATCH] D62868: [libc++] Always build with -fvisibility=hidden

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 13 08:05:29 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL368703: [libc++] Always build with -fvisibility=hidden (authored by ldionne, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D62868?vs=202981&id=214840#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62868/new/

https://reviews.llvm.org/D62868

Files:
  libcxx/trunk/include/chrono
  libcxx/trunk/include/filesystem
  libcxx/trunk/src/CMakeLists.txt
  libcxx/trunk/src/valarray.cpp


Index: libcxx/trunk/src/valarray.cpp
===================================================================
--- libcxx/trunk/src/valarray.cpp
+++ libcxx/trunk/src/valarray.cpp
@@ -12,8 +12,8 @@
 
 // These two symbols are part of the v1 ABI but not part of the >=v2 ABI.
 #if _LIBCPP_ABI_VERSION == 1
-template valarray<size_t>::valarray(size_t);
-template valarray<size_t>::~valarray();
+template _LIBCPP_FUNC_VIS valarray<size_t>::valarray(size_t);
+template _LIBCPP_FUNC_VIS valarray<size_t>::~valarray();
 #endif
 
 template void valarray<size_t>::resize(size_t, size_t);
Index: libcxx/trunk/src/CMakeLists.txt
===================================================================
--- libcxx/trunk/src/CMakeLists.txt
+++ libcxx/trunk/src/CMakeLists.txt
@@ -204,6 +204,7 @@
   if(LIBCXX_CXX_ABI_HEADER_TARGET)
     add_dependencies(${name} ${LIBCXX_CXX_ABI_HEADER_TARGET})
   endif()
+  target_compile_options(${name} PRIVATE -fvisibility=hidden)
   if(WIN32 AND NOT MINGW)
     target_compile_definitions(${name}
                                PRIVATE
@@ -355,7 +356,6 @@
   cxx_set_common_defines(cxx_static)
 
   if (LIBCXX_HERMETIC_STATIC_LIBRARY)
-    append_flags_if_supported(CXX_STATIC_LIBRARY_FLAGS -fvisibility=hidden)
     # If the hermetic library doesn't define the operator new/delete functions
     # then its code shouldn't declare them with hidden visibility.  They might
     # actually be provided by a shared library at link time.
Index: libcxx/trunk/include/filesystem
===================================================================
--- libcxx/trunk/include/filesystem
+++ libcxx/trunk/include/filesystem
@@ -2583,6 +2583,7 @@
   void disable_recursion_pending() { __rec_ = false; }
 
 private:
+  _LIBCPP_FUNC_VIS
   recursive_directory_iterator(const path& __p, directory_options __opt,
                                error_code* __ec);
 
Index: libcxx/trunk/include/chrono
===================================================================
--- libcxx/trunk/include/chrono
+++ libcxx/trunk/include/chrono
@@ -2934,6 +2934,7 @@
   typedef chrono::duration<rep, period> duration;
   typedef chrono::time_point<_FilesystemClock> time_point;
 
+  _LIBCPP_EXPORTED_FROM_ABI
   static _LIBCPP_CONSTEXPR_AFTER_CXX11 const bool is_steady = false;
 
   _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_FUNC_VIS static time_point now() noexcept;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62868.214840.patch
Type: text/x-patch
Size: 2355 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190813/c3cce2ee/attachment.bin>


More information about the libcxx-commits mailing list