Files
codex/patches/tikv-jemalloc-sys_make_env.patch
felixxia-oai 53ba408a2f Fix jemalloc tools and compiler flags for Bazel musl builds (#43533)
The musl CLI allocator needs declared native tools and consistent header
flags. Configure `tikv-jemalloc-sys` to use Bazel's Make toolchain and LLVM's
`llvm-nm` and `llvm-ranlib`, and patch its build script to honor `MAKE`.
Preserve `CFLAGS` and `CXXFLAGS` when generating jemalloc header dependencies
so dependency generation uses the same compiler flags as compilation.

GitOrigin-RevId: 4022b587ce0c8bce9331c541adbdf29c1d245558
2026-09-07 17:53:04 +00:00

14 lines
446 B
Diff

diff --git a/build.rs b/build.rs
--- a/build.rs
+++ b/build.rs
@@ -331,7 +331,8 @@
run_and_log(&mut cmd, &build_dir.join("config.log"));
// Make:
- let make = make_cmd(&host);
+ let make = read_and_watch_env("MAKE").unwrap_or_else(|_| make_cmd(&host).to_owned());
+ let make = make.as_str();
run(&mut make_command(make, &build_dir, &num_jobs));
// Skip watching this environment variables to avoid rebuild in CI.