Browse Source

Change HLSL_DISABLE_DEBUG_ITERATORS to more natural HLSL_ENABLE_DEBUG_ITERATORS and flip the default value (#2885)

Minmin Gong 5 năm trước cách đây
mục cha
commit
a5365731f0
3 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 1 1
      CMakeLists.txt
  2. 2 2
      cmake/modules/AddLLVM.cmake
  3. 1 1
      external/CMakeLists.txt

+ 1 - 1
CMakeLists.txt

@@ -93,7 +93,7 @@ option(HLSL_ENABLE_ANALYZE "Enables compiler analysis during compilation." OFF)
 option(HLSL_OPTIONAL_PROJS_IN_DEFAULT "Include optional projects in default build target." OFF) # HLSL Change
 option(HLSL_BUILD_DXILCONV "Include DXBC to DXIL converter and tools." ON) # HLSL Change
 
-option(HLSL_DISABLE_DEBUG_ITERATORS "Disable debug iterators for faster debug and to remove some additional allocations with improper noexcept attribution" ON) # HLSL Change
+option(HLSL_ENABLE_DEBUG_ITERATORS "Disable debug iterators for faster debug and to remove some additional allocations with improper noexcept attribution" OFF) # HLSL Change
 
 # HLSL Change Starts - support commit querying
 option(HLSL_SUPPORT_QUERY_GIT_COMMIT_INFO "Supports querying Git commit info." ON)

+ 2 - 2
cmake/modules/AddLLVM.cmake

@@ -46,9 +46,9 @@ function(llvm_update_compile_flags name)
       # This is just the default exception handling on Linux
     endif (MSVC)
   endif (LLVM_ENABLE_EH)
-  if (HLSL_DISABLE_DEBUG_ITERATORS)
+  if (NOT HLSL_ENABLE_DEBUG_ITERATORS)
     add_definitions(/D_ITERATOR_DEBUG_LEVEL=0)
-  endif (HLSL_DISABLE_DEBUG_ITERATORS)
+  endif (NOT HLSL_ENABLE_DEBUG_ITERATORS)
   # HLSL Changes End
 
   # Assume that;

+ 1 - 1
external/CMakeLists.txt

@@ -25,7 +25,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")
-      if (HLSL_DISABLE_DEBUG_ITERATORS)
+      if (NOT HLSL_ENABLE_DEBUG_ITERATORS)
         set(SPIRV_TOOLS_EXTRA_DEFINITIONS /D_ITERATOR_DEBUG_LEVEL=0)
       endif()
       add_subdirectory(${DXC_SPIRV_TOOLS_DIR} EXCLUDE_FROM_ALL)