Skip to content

Commit

Permalink
Workaround broken GitHub runner images (microsoft#6683)
Browse files Browse the repository at this point in the history
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:

actions/runner-images#10004

Related microsoft#6668

(cherry picked from commit 0b9acdb)
  • Loading branch information
llvm-beanz authored and pow2clk committed Jul 16, 2024
1 parent 1b9a796 commit 33277a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion projects/dxilconv/include/ShaderBinary/ShaderBinary.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 33277a1

Please sign in to comment.