From de44a382b070dab81a03dc2334a0bf826d2affb5 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 22 Jul 2015 10:11:00 -0700 Subject: [PATCH] Avoid usage of cfg! Harmful for cross-compiling situations --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 9509cfe..a31eefd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -279,7 +279,7 @@ impl Config { ("CC", "cl", "gcc", "cc") }; - get_var(env).unwrap_or(if cfg!(windows) { + get_var(env).unwrap_or(if target.contains("windows") { if self.target.contains("msvc") { msvc.to_string() } else {