diff --git a/crates/neon-build/src/lib.rs b/crates/neon-build/src/lib.rs index 1280bc30f..995d434c4 100644 --- a/crates/neon-build/src/lib.rs +++ b/crates/neon-build/src/lib.rs @@ -22,6 +22,11 @@ cfg_if! { println!("cargo:rustc-link-search=native={}", &node_lib_path.display()); println!("cargo:rustc-link-lib={}", &node_lib_file_path.file_stem().unwrap().to_str().unwrap()); + if cfg!(target_env = "msvc") && debug + { + println!("cargo:rustc-link-lib=msvcrtd"); + } + // Link `win_delay_load_hook.obj` for windows electron let node_runtime_env = "npm_config_runtime"; println!("cargo:rerun-if-env-changed={}", node_runtime_env); diff --git a/src/lib.rs b/src/lib.rs index c6c33b717..e4bfb1516 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -352,9 +352,6 @@ macro_rules! neon_stringify { } } -#[cfg(all(windows, not(neon_profile = "release")))] -compile_error!("Neon only builds with --release. For tests, try `cargo test --release`."); - #[cfg(test)] mod tests { extern crate rustversion;