[build] Disable std::mutex constexpr constructor on Windows (#6791)

We will plan to re-enable this after we release an installer with an updated runtime.
This commit is contained in:
Ryan Blue
2024-07-15 20:19:07 -04:00
committed by GitHub
parent 9703142ebe
commit 636450ab7b
2 changed files with 10 additions and 0 deletions

View File

@@ -54,4 +54,9 @@ macro(wpilib_target_warnings target)
)
target_compile_options(${target} PRIVATE -gz=zlib)
endif()
# Disable std::mutex constexpr constructor on MSVC
if(MSVC)
target_compile_options(${target} PRIVATE /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
endif()
endmacro()

View File

@@ -41,6 +41,11 @@ nativeUtils.platformConfigs.each {
}
}
// Disable std::mutex constexpr constructor on MSVC
nativeUtils.platformConfigs.named(nativeUtils.wpi.platforms.windowsx64).configure {
it.cppCompiler.args.add("/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR")
}
nativeUtils.platformConfigs.linuxathena.linker.args.add("-Wl,--fatal-warnings")
model {