diff options
| author | Francois Pichet <pichet2000@gmail.com> | 2010-12-04 14:30:22 +0000 |
|---|---|---|
| committer | Francois Pichet <pichet2000@gmail.com> | 2010-12-04 14:30:22 +0000 |
| commit | 82f3b5f94562778c7149570ea4b7bdeeb02f4fc9 (patch) | |
| tree | 1b5367f7a814dc7abc5a8e5a1cc3245bee40c9b5 | |
| parent | 8ceebfaa0438d2e4f6918394a17258dfc5a67384 (diff) | |
| download | bcm5719-llvm-82f3b5f94562778c7149570ea4b7bdeeb02f4fc9.tar.gz bcm5719-llvm-82f3b5f94562778c7149570ea4b7bdeeb02f4fc9.zip | |
Disable C++ exception handling on MSVC.
Total size of bin\Release on disk goes from 82.9 MB to 74.2 MB. (~10% saving)
llvm-svn: 120908
| -rw-r--r-- | llvm/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | llvm/cmake/modules/LLVMProcessSources.cmake | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 28e90475d48..371d73bbd98 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -247,6 +247,7 @@ if( MSVC ) add_llvm_definitions( -D_SCL_SECURE_NO_DEPRECATE ) add_llvm_definitions( -wd4146 -wd4503 -wd4996 -wd4800 -wd4244 -wd4624 ) add_llvm_definitions( -wd4355 -wd4715 -wd4180 -wd4345 -wd4224 -wd4267 -wd4291 ) + add_llvm_definitions( -wd4275) # Suppress 'new behavior: elements of array 'array' will be default initialized' add_llvm_definitions( -wd4351 ) diff --git a/llvm/cmake/modules/LLVMProcessSources.cmake b/llvm/cmake/modules/LLVMProcessSources.cmake index e8a5a9431a2..7bfca207f68 100644 --- a/llvm/cmake/modules/LLVMProcessSources.cmake +++ b/llvm/cmake/modules/LLVMProcessSources.cmake @@ -41,6 +41,9 @@ function(llvm_process_sources OUT_VAR) if( NOT LLVM_REQUIRES_EH ) if( CMAKE_COMPILER_IS_GNUCXX ) add_definitions( -fno-exceptions ) + elseif( MSVC ) + add_definitions( /EHs-c- ) + add_definitions( /D_HAS_EXCEPTIONS=0 ) endif() endif() if( NOT LLVM_REQUIRES_RTTI ) |

