Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't pass CFLAGS and fix _FORTIFY_SOURCE errors #116

Merged
merged 3 commits into from
Feb 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions jemalloc-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,9 @@ fn main() {
println!("cargo:rustc-link-lib={}={}", kind, &stem[3..]);
return;
}
// Disable -Wextra warnings - jemalloc doesn't compile free of warnings with
// it enabled: https://github.com/jemalloc/jemalloc/issues/1196
let compiler = cc::Build::new().extra_warnings(false).get_compiler();
let cflags = compiler
.args()
.iter()
.map(|s| s.to_str().unwrap())
.collect::<Vec<_>>()
.join(" ");

let compiler = cc::Build::new().get_compiler();
info!("CC={:?}", compiler.path());
info!("CFLAGS={:?}", cflags);

assert!(out_dir.exists(), "OUT_DIR does not exist");
let jemalloc_repo_dir = PathBuf::from("jemalloc");
Expand Down Expand Up @@ -190,9 +182,6 @@ fn main() {
)
.current_dir(&build_dir)
.env("CC", compiler.path())
.env("CFLAGS", cflags.clone())
.env("LDFLAGS", cflags.clone())
.env("CPPFLAGS", cflags)
.arg(format!("--with-version={je_version}"))
.arg("--disable-cxx")
.arg("--enable-doc=no")
Expand Down