diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-08-12 17:09:25 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-08-12 17:09:25 +0000 |
commit | f846557eb89a913c69b54653b9bece04b0473233 (patch) | |
tree | 8903f69343cdbdc9426eb442af0bb607be334445 /llvm/cmake/modules | |
parent | a5737a44da982bc65fa2ebcd1eb98e136435a613 (diff) | |
download | bcm5719-llvm-f846557eb89a913c69b54653b9bece04b0473233.tar.gz bcm5719-llvm-f846557eb89a913c69b54653b9bece04b0473233.zip |
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
Diffstat (limited to 'llvm/cmake/modules')
-rw-r--r-- | llvm/cmake/modules/HandleLLVMOptions.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake index bee77c14b5b..46d60b2cf74 100644 --- a/llvm/cmake/modules/HandleLLVMOptions.cmake +++ b/llvm/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) |