[llvm] r237743 - Try to fix the build with MSVC 2015 by disabling sized deallocation
Reid Kleckner
reid at kleckner.net
Tue May 19 16:28:25 PDT 2015
Author: rnk
Date: Tue May 19 18:28:23 2015
New Revision: 237743
URL: http://llvm.org/viewvc/llvm-project?rev=237743&view=rev
Log:
Try to fix the build with MSVC 2015 by disabling sized deallocation
I can't actually test this properly because uninstalling MSVC 2015 CTP 6
and reinstalling the 2015 RC takes hours. I can only verify that this
doesn't mess up MSVC 2013 and 2015 CTP 6 builds, which is what I've
done.
Should fix PR23513.
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=237743&r1=237742&r2=237743&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Tue May 19 18:28:23 2015
@@ -345,6 +345,11 @@ if( MSVC )
append("${flag}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
endforeach(flag)
+ # 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)
+ append_if(SUPPORTS_SIZED_DEALLOC "/Zc:sizedDealloc-" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+
elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
if (LLVM_ENABLE_WARNINGS)
append("-Wall -W -Wno-unused-parameter -Wwrite-strings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
More information about the llvm-commits
mailing list