From 33277a123e88b4030beb1a1c5f73101045e4d8cd Mon Sep 17 00:00:00 2001 From: Chris B Date: Tue, 11 Jun 2024 10:02:33 -0500 Subject: [PATCH] Workaround broken GitHub runner images (#6683) This PR contains two changes: 1) Moves a pragma to disable a warning, which seems to be required by the new compiler. 2) Adds a preprocessor define to workaround the crashes caused by the runner image mismatching C++ runtime versions. The second change we will want to revert once the runner images are fixed. The issue tracking the runner images is: https://github.com/actions/runner-images/issues/10004 Related #6668 (cherry picked from commit 0b9acdb75e17acc54989d690a480a275cd836783) --- CMakeLists.txt | 6 ++++++ projects/dxilconv/include/ShaderBinary/ShaderBinary.h | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 15097b8473..31585c9d85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,6 +120,12 @@ if(WIN32 AND NOT (CMAKE_C_COMPILER_ARCHITECTURE_ID MATCHES "ARM.*")) add_link_options(/CETCOMPAT) endif() +# This is a hack workaround for the broken azure runner images: +# https://github.com/actions/runner-images/issues/10004 +if(WIN32) + add_compile_definitions(_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR) +endif() + # HLSL Change Ends # HLSL Change Starts - set flag for Appveyor CI diff --git a/projects/dxilconv/include/ShaderBinary/ShaderBinary.h b/projects/dxilconv/include/ShaderBinary/ShaderBinary.h index 38f0dae598..54cedad1b6 100644 --- a/projects/dxilconv/include/ShaderBinary/ShaderBinary.h +++ b/projects/dxilconv/include/ShaderBinary/ShaderBinary.h @@ -378,10 +378,11 @@ class COperandBase { INT64 m_Value64[2]; double m_Valued[2]; }; + +#pragma warning(suppress : 4201) // Warning about nameless structure. struct { D3D10_SB_OPERAND_INDEX_REPRESENTATION m_IndexType[3]; D3D10_SB_OPERAND_INDEX_DIMENSION m_IndexDimension; -#pragma warning(suppress : 4201) // Warning about nameless structure. }; friend class CShaderAsm;