Skip to content

Commit 1707caf

Browse files
committed
Never use the debug CRT on Windows
See rust-lang/cmake-rs#30 (comment).
1 parent 22b51b0 commit 1707caf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

boring-sys/build/main.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,14 @@ fn get_boringssl_cmake_config(config: &Config) -> cmake::Config {
199199
let src_path = get_boringssl_source_path(config);
200200
let mut boringssl_cmake = cmake::Config::new(src_path);
201201

202+
if config.target_os == "windows" {
203+
// Explicitly use the non-debug CRT.
204+
// This is required now because newest BoringSSL requires CMake 3.22 which
205+
// uses the new logic with CMAKE_MSVC_RUNTIME_LIBRARY introduced in CMake 3.15.
206+
// https://github.com/rust-lang/cmake-rs/pull/30#issuecomment-2969758499
207+
boringssl_cmake.define("CMAKE_MSVC_RUNTIME_LIBRARY", "MultiThreadedDLL");
208+
}
209+
202210
if config.host == config.target {
203211
return boringssl_cmake;
204212
}

0 commit comments

Comments
 (0)