From 230f6c810779ac108c4375e340b9ba43e94e0ce8 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 20 Feb 2015 14:16:53 -0800 Subject: [PATCH] Fix looking at CFLAGS --- Cargo.toml | 2 +- src/lib.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 83957e4..d54563b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "gcc" -version = "0.3.0" +version = "0.3.1" authors = ["Alex Crichton "] license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/gcc-rs" diff --git a/src/lib.rs b/src/lib.rs index 7ad6c79..c618e8c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -270,7 +270,8 @@ fn ar(target: &str) -> String { fn cflags() -> Vec { get_var("CFLAGS").unwrap_or(String::new()) - .split(|c: char| c.is_whitespace()).map(|s| s.to_string()) + .split(|c: char| c.is_whitespace()).filter(|s| !s.is_empty()) + .map(|s| s.to_string()) .collect() }