From f96f92d7119597120bd317a529179b0aa459041f Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 17 Aug 2017 00:11:48 -0400 Subject: [PATCH] [spirv] Update SPIR-V dependencies and disable debug iterators (#574) --- cmake/modules/AddLLVM.cmake | 4 +--- external/CMakeLists.txt | 1 + external/SPIRV-Headers | 2 +- external/SPIRV-Tools | 2 +- external/googletest | 2 +- external/re2 | 2 +- tools/clang/unittests/HLSL/CompilerTest.cpp | 6 ------ 7 files changed, 6 insertions(+), 13 deletions(-) diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index b0a4e00a8..65dc40f07 100644 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -46,9 +46,7 @@ function(llvm_update_compile_flags name) message(ERROR "Unimplemented") endif (MSVC) endif (LLVM_ENABLE_EH) - # Disable debug iterators for faster debug and to remove some additional allocations with improper noexcept attribution. - # Currently commented out because SPIR-V libs compile their debug modules with debug iterators. - # add_definitions(/D_ITERATOR_DEBUG_LEVEL=0) + add_definitions(/D_ITERATOR_DEBUG_LEVEL=0) # HLSL Changes End # Assume that; diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 182839bc3..7ee001fb1 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -22,6 +22,7 @@ if (${ENABLE_SPIRV_CODEGEN}) if (IS_DIRECTORY ${DXC_SPIRV_TOOLS_DIR}) # We only need the library from SPIRV-Tools. set(SPIRV_SKIP_EXECUTABLES ON CACHE BOOL "Skip building SPIRV-Tools executables") + set(SPIRV_TOOLS_EXTRA_DEFINITIONS /D_ITERATOR_DEBUG_LEVEL=0) add_subdirectory(${DXC_SPIRV_TOOLS_DIR} EXCLUDE_FROM_ALL) endif() if (NOT TARGET SPIRV-Tools) diff --git a/external/SPIRV-Headers b/external/SPIRV-Headers index 63e1062a1..cd3088edf 160000 --- a/external/SPIRV-Headers +++ b/external/SPIRV-Headers @@ -1 +1 @@ -Subproject commit 63e1062a194750b354d48be8c16750d7a4d0dc4e +Subproject commit cd3088edf6258ae7c806686a6cdcba27350137af diff --git a/external/SPIRV-Tools b/external/SPIRV-Tools index dbc2049aa..768d9b42d 160000 --- a/external/SPIRV-Tools +++ b/external/SPIRV-Tools @@ -1 +1 @@ -Subproject commit dbc2049aa35a06b160b91fb76820358a17b77bfa +Subproject commit 768d9b42d38c7562bd42dbc29b22c61046848ee8 diff --git a/external/googletest b/external/googletest index 59c795ce0..b7e8a993b 160000 --- a/external/googletest +++ b/external/googletest @@ -1 +1 @@ -Subproject commit 59c795ce08be0c8b225bc894f8da6c7954ea5c14 +Subproject commit b7e8a993b4125d1083cb431d91407d8ee4dba2ad diff --git a/external/re2 b/external/re2 index b2c9765b4..971f917a3 160000 --- a/external/re2 +++ b/external/re2 @@ -1 +1 @@ -Subproject commit b2c9765b4a7afbea8b6be1dae548b6f4d5f39e42 +Subproject commit 971f917a35125c6dcfabf099d5fe9a1e5c383265 diff --git a/tools/clang/unittests/HLSL/CompilerTest.cpp b/tools/clang/unittests/HLSL/CompilerTest.cpp index 173611278..04784212b 100644 --- a/tools/clang/unittests/HLSL/CompilerTest.cpp +++ b/tools/clang/unittests/HLSL/CompilerTest.cpp @@ -193,10 +193,6 @@ bool VersionSupportInfo::SkipDxilVersion(unsigned major, unsigned minor) { return false; } bool VersionSupportInfo::SkipOutOfMemoryTest() { - if (m_CompilerIsDebugBuild) { // same detection logic at the moment - WEX::Logging::Log::Comment(L"Test skipped due to out-of-memory robustness requirement."); - return true; - } return false; } @@ -2533,8 +2529,6 @@ TEST_F(CompilerTest, CompileWhenNoMemThenOOM) { // In Debug, without /D_ITERATOR_DEBUG_LEVEL=0, debug iterators will be used; // this causes a problem where std::string is specified as noexcept, and yet // a sentinel is allocated that may fail and throw. - // To run this in Debug without debug iterators, uncomment the following line in cmake/modules/AddLLVM.cmake - // add_definitions(/D_ITERATOR_DEBUG_LEVEL=0) if (m_ver.SkipOutOfMemoryTest()) return; // Now, fail each allocation and make sure we get an error.