Skip to content

Commit 8665a9e

Browse files
committed
Don't ignore CFLAGS.
This breaks cross-compilation via "-target X" set in CFLAGS. Signed-off-by: Piotr Sikora <[email protected]>
1 parent 0b214d6 commit 8665a9e

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

psm/build.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,6 @@ fn main() {
6161
let os = ::std::env::var("CARGO_CFG_TARGET_OS").unwrap();
6262
let endian = ::std::env::var("CARGO_CFG_TARGET_ENDIAN").unwrap();
6363

64-
// We are only assembling a single file and any flags in the environment probably
65-
// don't apply in this case, so we don't want to use them. Unfortunately, cc
66-
// doesn't provide a way to clear/ignore flags set from the environment, so
67-
// we manually remove them instead
68-
for key in
69-
std::env::vars().filter_map(|(k, _)| if k.contains("CFLAGS") { Some(k) } else { None })
70-
{
71-
std::env::remove_var(key);
72-
}
73-
7464
let mut cfg = cc::Build::new();
7565
let msvc = cfg.get_compiler().is_like_msvc();
7666
let asm = if let Some((asm, canswitch)) = find_assembly(&arch, &endian, &os, &env, msvc) {

0 commit comments

Comments
 (0)