[llvm] r244767 - Use /Zc:inline when building with MSVC.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 10:09:25 PDT 2015


Author: rafael
Date: Wed Aug 12 12:09:25 2015
New Revision: 244767

URL: http://llvm.org/viewvc/llvm-project?rev=244767&view=rev
Log:
Use /Zc:inline when building with MSVC.

This reduces the total .obj size when building llvm from
496,690,342 to 219,334,936 bytes.

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=244767&r1=244766&r2=244767&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Wed Aug 12 12:09:25 2015
@@ -348,6 +348,8 @@ if( MSVC )
     append("${flag}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
   endforeach(flag)
 
+  append("/Zc:inline" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+
   # Disable sized deallocation if the flag is supported. MSVC fails to compile
   # the operator new overload in User otherwise.
   check_c_compiler_flag("/WX /Zc:sizedDealloc-" SUPPORTS_SIZED_DEALLOC)




More information about the llvm-commits mailing list