Visual C++ does not support -ffunction-sections -fdata-sections.
authorYaron Keren <yaron.keren@gmail.com>
Mon, 30 Dec 2013 05:31:53 +0000 (05:31 +0000)
committerYaron Keren <yaron.keren@gmail.com>
Mon, 30 Dec 2013 05:31:53 +0000 (05:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198203 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/modules/AddLLVM.cmake

index 6840cfca81fad270080e5baa68daa4cd1d725e5b..b31aeeeae1ff6caaf35f053fd2e393c66353f46e 100644 (file)
@@ -77,7 +77,7 @@ function(add_llvm_symbol_exports target_name export_file)
 endfunction(add_llvm_symbol_exports)
 
 function(add_dead_strip target_name)
-  if(NOT CYGWIN AND NOT MINGW)
+  if(NOT CYGWIN AND NOT MINGW AND NOT MSVC)
     if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
        SET(CMAKE_CXX_FLAGS
            "${CMAKE_CXX_FLAGS}  -ffunction-sections -fdata-sections"