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.

llvm-svn: 244767
This commit is contained in:
Rafael Espindola 2015-08-12 17:09:25 +00:00
parent a5737a44da
commit f846557eb8
1 changed files with 2 additions and 0 deletions

View File

@ -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)