File tree Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Expand file tree Collapse file tree 5 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -666,7 +666,7 @@ function(llvm_add_library name)
666666 # When building shared objects for each target there are some internal APIs
667667 # that are used across shared objects which we can't hide.
668668 if (LLVM_BUILD_LLVM_DYLIB_VIS AND NOT BUILD_SHARED_LIBS AND NOT APPLE AND
669- (NOT (WIN32 OR CYGWIN ) OR (MINGW AND CMAKE_CXX_COMPILER_ID MATCHES "Clang" )) AND
669+ (NOT (WIN32 OR CYGWIN ) OR (( MINGW OR CYGWIN ) AND CMAKE_CXX_COMPILER_ID MATCHES "Clang" )) AND
670670 NOT (${CMAKE_SYSTEM_NAME} MATCHES "AIX" ) AND
671671 NOT DEFINED CMAKE_CXX_VISIBILITY_PRESET)
672672
Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ if( LLVM_REVERSE_ITERATION )
210210 set ( LLVM_ENABLE_REVERSE_ITERATION 1 )
211211endif ()
212212
213- if (WIN32 )
213+ if (WIN32 OR CYGWIN )
214214 set (LLVM_HAVE_LINK_VERSION_SCRIPT 0)
215215 if (CYGWIN )
216216 set (LLVM_ON_WIN32 0)
@@ -455,7 +455,7 @@ if( LLVM_ENABLE_PIC )
455455endif ()
456456
457457if ((NOT (${CMAKE_SYSTEM_NAME} MATCHES "AIX" )) AND
458- (NOT (WIN32 OR CYGWIN ) OR (MINGW AND CMAKE_CXX_COMPILER_ID MATCHES "Clang" )))
458+ (NOT (WIN32 OR CYGWIN ) OR (( MINGW OR CYGWIN ) AND CMAKE_CXX_COMPILER_ID MATCHES "Clang" )))
459459 # GCC for MinGW does nothing about -fvisibility-inlines-hidden, but warns
460460 # about use of the attributes. As long as we don't use the attributes (to
461461 # override the default) we shouldn't set the command line options either.
Original file line number Diff line number Diff line change 129129#endif
130130
131131#if (!(defined(_WIN32) || defined(__CYGWIN__)) || \
132- (defined (__MINGW32__) && defined (__clang__)))
132+ (( defined (__MINGW32__) || defined (__CYGWIN__) ) && defined (__clang__)))
133133#define LLVM_LIBRARY_VISIBILITY LLVM_ATTRIBUTE_VISIBILITY_HIDDEN
134134// Clang compilers older then 15 do not support gnu style attributes on
135135// namespaces.
198198#endif
199199#define LLVM_ABI_EXPORT __declspec (dllexport)
200200#elif defined(__ELF__) || defined(__MINGW32__) || defined(_AIX) || \
201- defined (__MVS__)
201+ defined (__MVS__) || defined(__CYGWIN__)
202202#define LLVM_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
203203#define LLVM_TEMPLATE_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
204204#define LLVM_EXPORT_TEMPLATE
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ add_llvm_component_library(LLVMTarget
2323# When building shared objects for each target there are some internal APIs
2424# that are used across shared objects which we can't hide.
2525if (NOT BUILD_SHARED_LIBS AND NOT APPLE AND
26- (NOT (WIN32 OR CYGWIN ) OR (MINGW AND CMAKE_CXX_COMPILER_ID MATCHES "Clang" )) AND
26+ (NOT (WIN32 OR CYGWIN ) OR (( MINGW OR CYGWIN ) AND CMAKE_CXX_COMPILER_ID MATCHES "Clang" )) AND
2727 NOT (${CMAKE_SYSTEM_NAME} MATCHES "AIX" ) AND
2828 NOT DEFINED CMAKE_CXX_VISIBILITY_PRESET)
2929 # Set default visibility to hidden, so we don't export all the Target classes
Original file line number Diff line number Diff line change @@ -57,11 +57,11 @@ if(LLVM_BUILD_LLVM_DYLIB)
5757 else ()
5858 # GNU ld doesn't resolve symbols in the version script.
5959 set (LIB_NAMES -Wl,--whole-archive ${LIB_NAMES} -Wl,--no -whole-archive)
60- if (NOT LLVM_LINKER_IS_SOLARISLD AND NOT MINGW)
60+ if (NOT LLVM_LINKER_IS_SOLARISLD AND NOT ( MINGW OR CYGWIN ) )
6161 # Solaris ld does not accept global: *; so there is no way to version *all* global symbols
6262 set (LIB_NAMES -Wl,--version -script,${LLVM_LIBRARY_DIR} /tools/llvm-shlib/simple_version_script.map ${LIB_NAMES} )
6363 endif ()
64- if (NOT MINGW AND NOT LLVM_LINKER_IS_SOLARISLD_ILLUMOS)
64+ if (NOT ( MINGW OR CYGWIN ) AND NOT LLVM_LINKER_IS_SOLARISLD_ILLUMOS)
6565 # Optimize function calls for default visibility definitions to avoid PLT and
6666 # reduce dynamic relocations.
6767 # Note: for -fno-pic default, the address of a function may be different from
You can’t perform that action at this time.
0 commit comments