summaryrefslogtreecommitdiffstats
path: root/libcxx/src
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/src')
-rw-r--r--libcxx/src/CMakeLists.txt2
-rw-r--r--libcxx/src/valarray.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index 352791e8b28..11c911ac2dc 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -204,6 +204,7 @@ function(cxx_set_common_defines name)
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 @@ if (LIBCXX_ENABLE_STATIC)
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.
diff --git a/libcxx/src/valarray.cpp b/libcxx/src/valarray.cpp
index 7bf0b417588..64d26583c74 100644
--- a/libcxx/src/valarray.cpp
+++ b/libcxx/src/valarray.cpp
@@ -12,8 +12,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// 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);
OpenPOWER on IntegriCloud