cplus_demangle 0.1.1

Rust wrapper for GNU libiberty's cplus_demangle to demangle C++ symbols
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
fn main() {
    // docs.rs build env does not seem to have libiberty
    if let Ok(_) = std::env::var("DOCS_RS") {
        return;
    }

    cc::Build::new()
        .file("src/demangle.c")
        .compile("libdemangle.a");
    // Cannot use #[link] macro in lib.rs because it adds -liberty before linking
    // with our libdemangle.a which will fail.
    println!("cargo:rustc-link-lib=iberty");
}