diff options
author | Ted Mielczarek <ted@mielczarek.org> | 2016-10-24 15:16:28 -0400 |
---|---|---|
committer | Ted Mielczarek <ted@mielczarek.org> | 2016-10-25 10:43:00 +0000 |
commit | 2ecb2baba829a7ed4fff4bc60edf0c1643dc129c (patch) | |
tree | 4106bbadd878c7148c9393e33d5bf5cbb3024f2b /configure | |
parent | Fix iterating over the MDXStateFeature entries on 32-bit hosts (diff) | |
download | breakpad-2ecb2baba829a7ed4fff4bc60edf0c1643dc129c.tar.xz |
Don't demangle Rust symbols by default, but allow linking to rust-demangle.
The Rust compiler uses GCC C++ name mangling, but it has another layer of
encoding so abi::cxa_demangle doesn't produce great results. This patch
changes dump_syms to dump unmangled names by default so that consumers can
demangle them after-the-fact.
It also adds a tiny bit of support for linking against a Rust library I wrote
that can demangle Rust symbols nicely:
https://github.com/luser/rust-demangle-capi
BUG=
Change-Id: I63a425035ebb7ac516f067fed2aa782849ea9604
Reviewed-on: https://chromium-review.googlesource.com/402308
Reviewed-by: Mark Mentovai <mark@chromium.org>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 44 |
1 files changed, 43 insertions, 1 deletions
@@ -626,6 +626,8 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +RUST_DEMANGLE_LIBS +RUST_DEMANGLE_CFLAGS SELFTEST_FALSE SELFTEST_TRUE GTEST_LIBS @@ -775,6 +777,7 @@ enable_processor enable_tools enable_system_test_libs enable_selftest +with_rust_demangle ' ac_precious_vars='build_alias host_alias @@ -795,7 +798,9 @@ GMOCK_CFLAGS GMOCK_LIBS GTEST_CONFIG GTEST_CFLAGS -GTEST_LIBS' +GTEST_LIBS +RUST_DEMANGLE_CFLAGS +RUST_DEMANGLE_LIBS' # Initialize some variables set by options. @@ -1433,6 +1438,14 @@ Optional Features: --enable-selftest Run extra tests with "make check" (may conflict with optimizations) (default is no) +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-rust-demangle=/path/to/rust-demangle-capi + Link against the rust-demangle library to demangle + Rust language symbols during symbol dumping (default + is no) Pass the path to the crate root. + Some influential environment variables: CC C compiler command CFLAGS C compiler flags @@ -1456,6 +1469,10 @@ Some influential environment variables: GTEST_CFLAGS Compiler flags for gtest GTEST_LIBS Linker flags for gtest + RUST_DEMANGLE_CFLAGS + Compiler flags for rust-demangle + RUST_DEMANGLE_LIBS + Linker flags for rust-demangle Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -7747,6 +7764,31 @@ else fi + +# Check whether --with-rust-demangle was given. +if test "${with_rust_demangle+set}" = set; then : + withval=$with_rust_demangle; case "${withval}" in + yes) + as_fn_error $? "You must pass the path to the rust-demangle-capi crate for --with-rust-demangle" "$LINENO" 5 + ;; + no) + rust_demangle=false + ;; + *) + if ! test -f "${withval}/Cargo.toml"; then + as_fn_error $? "You must pass the path to the rust-demangle-capi crate for --with-rust-demangle" "$LINENO" 5 + fi + RUST_DEMANGLE_CFLAGS="-DHAVE_RUST_DEMANGLE -I${withval}/target/include" + RUST_DEMANGLE_LIBS="-L${withval}/target/release -lrust_demangle -lpthread -ldl" + ;; + esac +else + rust_demangle=false +fi + + + + ac_config_files="$ac_config_files breakpad.pc breakpad-client.pc Makefile" |