mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237743 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -345,6 +345,11 @@ if( MSVC )
|
|||||||
append("${flag}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
|
append("${flag}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
|
||||||
endforeach(flag)
|
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 )
|
elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
|
||||||
if (LLVM_ENABLE_WARNINGS)
|
if (LLVM_ENABLE_WARNINGS)
|
||||||
append("-Wall -W -Wno-unused-parameter -Wwrite-strings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
|
append("-Wall -W -Wno-unused-parameter -Wwrite-strings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
|
||||||
|
Reference in New Issue
Block a user