From 641cc653122874d85149f4f0213becbcb29c3293 Mon Sep 17 00:00:00 2001 From: Peter Atashian Date: Wed, 3 Apr 2019 16:27:16 -0400 Subject: [PATCH] On Windows, build the C code in release mode always. Rust always uses the release CRT, even in debug mode, so the C code should do the same. --- crates/neon-runtime/build.rs | 1 + src/lib.rs | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/neon-runtime/build.rs b/crates/neon-runtime/build.rs index 5cf085423..79a473055 100644 --- a/crates/neon-runtime/build.rs +++ b/crates/neon-runtime/build.rs @@ -119,6 +119,7 @@ fn link_library() { } fn debug() -> bool { + if cfg!(windows) { return false } match env::var("DEBUG") { Ok(s) => s == "true", Err(_) => false diff --git a/src/lib.rs b/src/lib.rs index 134f2dbea..462888b8e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -288,9 +288,6 @@ macro_rules! declare_types { { } => { }; } -#[cfg(all(windows, not(neon_profile = "release")))] -compile_error!("Neon only builds with --release. For tests, try `cargo test --release`."); - #[cfg(test)] mod tests { use std::path::{Path, PathBuf};