1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

[CMake] Support -fvisibility-inlines-hidden when LLVM_ENABLE_PIC=Off

I'm unaware of any reasons why -fvisibility-inlines-hidden would depend on PIC, and since autoconf supports this flag without PIC, we should support it in CMake too.

llvm-svn: 253517
This commit is contained in:
Chris Bieneman 2015-11-18 22:49:26 +00:00
parent d80e9e19b2
commit 76a5e53fc4

View File

@ -181,14 +181,13 @@ if( LLVM_ENABLE_PIC )
# On Windows all code is PIC. MinGW warns if -fPIC is used.
else()
add_flag_or_print_warning("-fPIC" FPIC)
endif()
endif()
if( WIN32 OR CYGWIN)
if(NOT WIN32 AND NOT CYGWIN)
# MinGW warns if -fvisibility-inlines-hidden is used.
else()
check_cxx_compiler_flag("-fvisibility-inlines-hidden" SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG)
append_if(SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG "-fvisibility-inlines-hidden" CMAKE_CXX_FLAGS)
endif()
endif()
endif()
if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )