Skip to content

Commit fa4486d

Browse files
authored
don't pass CFLAGS and fix _FORTIFY_SOURCE errors (#116)
Signed-off-by: Konrad Stepniak <[email protected]>
1 parent 876bc11 commit fa4486d

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

jemalloc-sys/build.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -145,17 +145,9 @@ fn main() {
145145
println!("cargo:rustc-link-lib={}={}", kind, &stem[3..]);
146146
return;
147147
}
148-
// Disable -Wextra warnings - jemalloc doesn't compile free of warnings with
149-
// it enabled: https://github.com/jemalloc/jemalloc/issues/1196
150-
let compiler = cc::Build::new().extra_warnings(false).get_compiler();
151-
let cflags = compiler
152-
.args()
153-
.iter()
154-
.map(|s| s.to_str().unwrap())
155-
.collect::<Vec<_>>()
156-
.join(" ");
148+
149+
let compiler = cc::Build::new().get_compiler();
157150
info!("CC={:?}", compiler.path());
158-
info!("CFLAGS={:?}", cflags);
159151

160152
assert!(out_dir.exists(), "OUT_DIR does not exist");
161153
let jemalloc_repo_dir = PathBuf::from("jemalloc");
@@ -190,9 +182,6 @@ fn main() {
190182
)
191183
.current_dir(&build_dir)
192184
.env("CC", compiler.path())
193-
.env("CFLAGS", cflags.clone())
194-
.env("LDFLAGS", cflags.clone())
195-
.env("CPPFLAGS", cflags)
196185
.arg(format!("--with-version={je_version}"))
197186
.arg("--disable-cxx")
198187
.arg("--enable-doc=no")

0 commit comments

Comments
 (0)