Skip to content

Commit

Permalink
Update libunwind to v1.7-stable
Browse files Browse the repository at this point in the history
  • Loading branch information
anfedotoff committed Feb 17, 2023
1 parent 266999b commit 8e52d7b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 30 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ exclude = ["/data"]
[features]
ptrace = []
[dependencies]
libc = "0.2.66"
libc = "^0.2"

[build-dependencies]
bindgen = "0.52.0"
fs_extra = "1.1.0"
autotools = "0.2"
bindgen = "^0.64"
fs_extra = "^1.3"
autotools = "^0.2"

30 changes: 5 additions & 25 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,8 @@ fn main() {
dst.enable("ptrace", None);
}

if link_lib_arch == "x86" && host.contains("x86_64") {
dst.cflag("-m32")
.target(&target)
.host(&target)
.disable("documentation", None)
.disable("tests", None)
.enable_shared();

// Configure. Check if we compile for arm target on x86_64 host
} else if link_lib_arch == "arm" && host.contains("x86_64") {

dst.env("CC","arm-linux-gnueabihf-gcc")
.target(&target)
.host(&target)
.disable("documentation", None)
.disable("tests", None)
.enable_shared();
}
else {
dst.disable("documentation", None).disable("tests", None).enable_shared().enable_static();
}

let dst = dst.build();
println!("cargo:rustc-link-search={}/lib", dst.display());
}
Expand Down Expand Up @@ -106,24 +87,24 @@ fn main() {
bindgen::Builder::default()
.header(project_dir.join(wrapper).to_str().unwrap())
.clang_arg("-Ilibunwind/include")
.blacklist_function("_Ux86_.*")
.blocklist_function("_Ux86_.*")
},
"arm" => {
bindgen::Builder::default()
.header(project_dir.join(wrapper).to_str().unwrap())
.clang_arg("-Ilibunwind/include")
.blacklist_function("_Uarm_.*")
.blocklist_function("_Uarm_.*")
},
_=> {
bindgen::Builder::default()
.header(project_dir.join(wrapper).to_str().unwrap())
.clang_arg("-Ilibunwind/include")
.blacklist_function("_Ux86_64_.*")
.blocklist_function("_Ux86_64_.*")
}
};

let bindings = if !env::var_os("CARGO_FEATURE_PTRACE").is_some() {
bindings.blacklist_function("_UPT_.*").blacklist_item("_UPT_.*")
bindings.blocklist_function("_UPT_.*").blocklist_item("_UPT_.*")
} else {
bindings
};
Expand All @@ -132,4 +113,3 @@ fn main() {
.write_to_file(out_dir.join("bindings.rs"))
.expect("Couldn't write bindings!");
}

2 changes: 1 addition & 1 deletion libunwind
Submodule libunwind updated 252 files

0 comments on commit 8e52d7b

Please sign in to comment.