From: Rafael Espindola Date: Wed, 12 Aug 2015 17:09:25 +0000 (+0000) Subject: Use /Zc:inline when building with MSVC. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=02c4a0d5c18a4d280b9a4127cfc96871fc014c5a;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244767 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index bee77c14b5b..46d60b2cf74 100644 --- a/cmake/modules/HandleLLVMOptions.cmake +++ b/cmake/modules/HandleLLVMOptions.cmake @@ -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)