mirror of
https://github.com/girlbossceo/hardened_malloc-rs.git
synced 2025-04-29 14:19:25 -04:00
make include an absolute path
Signed-off-by: strawberry <strawberry@pupbrain.dev>
This commit is contained in:
parent
56b0c5ddcb
commit
3f370543aa
1 changed files with 12 additions and 2 deletions
14
build.rs
14
build.rs
|
@ -61,12 +61,18 @@ fn main() {
|
||||||
println!("cargo:rerun-if-changed=src/hardened_malloc/.git/refs/tags");
|
println!("cargo:rerun-if-changed=src/hardened_malloc/.git/refs/tags");
|
||||||
|
|
||||||
let out_dir = env::var("OUT_DIR").unwrap();
|
let out_dir = env::var("OUT_DIR").unwrap();
|
||||||
|
let current_working_directory = current_dir().unwrap();
|
||||||
|
|
||||||
if !Path::new("src/hardened_malloc/Makefile").exists() {
|
if !Path::new("src/hardened_malloc/Makefile").exists() {
|
||||||
println!("src/hardened_malloc/Makefile does not exist, running submodule sync");
|
println!("src/hardened_malloc/Makefile does not exist, running submodule sync");
|
||||||
update_submodules();
|
update_submodules();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
println!(
|
||||||
|
"cargo:include={}/src/hardened_malloc/include",
|
||||||
|
current_working_directory.display()
|
||||||
|
);
|
||||||
|
|
||||||
let compiler = if cfg!(feature = "gcc") {
|
let compiler = if cfg!(feature = "gcc") {
|
||||||
check_compiler("gcc");
|
check_compiler("gcc");
|
||||||
"gcc"
|
"gcc"
|
||||||
|
@ -109,8 +115,12 @@ fn main() {
|
||||||
String::from_utf8_lossy(&make_output.stderr)
|
String::from_utf8_lossy(&make_output.stderr)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
println!("OUT_DIR: {}", out_dir);
|
|
||||||
println!("cargo:include=src/hardened_malloc/include");
|
println!(
|
||||||
|
"[hardened_malloc-sys]: current working directory: {}",
|
||||||
|
current_working_directory.display()
|
||||||
|
);
|
||||||
|
println!("[hardened_malloc-sys]: OUT_DIR={}", out_dir);
|
||||||
|
|
||||||
if cfg!(feature = "light") {
|
if cfg!(feature = "light") {
|
||||||
//println!("cargo:rustc-link-lib=static=src/hardened_malloc/out-light/libhardened_malloc-light.so");
|
//println!("cargo:rustc-link-lib=static=src/hardened_malloc/out-light/libhardened_malloc-light.so");
|
||||||
|
|
Loading…
Add table
Reference in a new issue