diff --git a/mozjs-sys/build.rs b/mozjs-sys/build.rs index 20466425dec..ebd3c768400 100644 --- a/mozjs-sys/build.rs +++ b/mozjs-sys/build.rs @@ -331,7 +331,7 @@ fn build_jsapi_bindings(build_dir: &Path) { builder = builder.clang_arg("-fms-compatibility"); } - if let Ok(flags) = env::var("CXXFLAGS") { + if let Ok(flags) = env::var("BINDGEN_CXXFLAGS") { for flag in flags.split_whitespace() { builder = builder.clang_arg(flag); }