[llvm-commits] [llvm] r148539 - /llvm/trunk/cmake/modules/HandleLLVMOptions.cmake

Rafael Espindola rafael.espindola at gmail.com
Fri Jan 20 05:10:11 PST 2012


Author: rafael
Date: Fri Jan 20 07:10:10 2012
New Revision: 148539

URL: http://llvm.org/viewvc/llvm-project?rev=148539&view=rev
Log:
Don't use -fvisibility-inlines-hidden on mingw to try to avoid a lot of
warnings from gcc.

Modified:
    llvm/trunk/cmake/modules/HandleLLVMOptions.cmake

Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=148539&r1=148538&r2=148539&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Fri Jan 20 07:10:10 2012
@@ -89,11 +89,15 @@
       message(WARNING "-fPIC not supported.")
     endif()
 
-    check_cxx_compiler_flag("-fvisibility-inlines-hidden" SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG)
-    if( SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG )
-      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden")
-      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility-inlines-hidden")
-    endif()
+    if( WIN32 OR CYGWIN)
+      # MinGW warns if -fvisibility-inlines-hidden is used.
+    else()
+      check_cxx_compiler_flag("-fvisibility-inlines-hidden" SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG)
+      if( SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG )
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden")
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility-inlines-hidden")
+      endif()
+     endif()
   endif()
 endif()
 





More information about the llvm-commits mailing list