aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTed Mielczarek <ted@mielczarek.org>2016-10-24 15:16:28 -0400
committerTed Mielczarek <ted@mielczarek.org>2016-10-25 10:43:00 +0000
commit2ecb2baba829a7ed4fff4bc60edf0c1643dc129c (patch)
tree4106bbadd878c7148c9393e33d5bf5cbb3024f2b /configure.ac
parentFix iterating over the MDXStateFeature entries on 32-bit hosts (diff)
downloadbreakpad-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.ac')
-rw-r--r--configure.ac25
1 files changed, 25 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 23195b7d..840bb8c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -195,6 +195,31 @@ AC_ARG_ENABLE(selftest,
[selftest=false])
AM_CONDITIONAL(SELFTEST, test x$selftest = xtrue)
+AC_ARG_WITH(rust-demangle,
+ AS_HELP_STRING([--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.]),
+ [case "${withval}" in
+ yes)
+ AC_MSG_ERROR(You must pass the path to the rust-demangle-capi crate for --with-rust-demangle)
+ ;;
+ no)
+ rust_demangle=false
+ ;;
+ *)
+ if ! test -f "${withval}/Cargo.toml"; then
+ AC_MSG_ERROR(You must pass the path to the rust-demangle-capi crate for --with-rust-demangle)
+ fi
+ RUST_DEMANGLE_CFLAGS="-DHAVE_RUST_DEMANGLE -I${withval}/target/include"
+ RUST_DEMANGLE_LIBS="-L${withval}/target/release -lrust_demangle -lpthread -ldl"
+ ;;
+ esac],
+ [rust_demangle=false])
+AC_ARG_VAR([RUST_DEMANGLE_CFLAGS], [Compiler flags for rust-demangle])
+AC_ARG_VAR([RUST_DEMANGLE_LIBS], [Linker flags for rust-demangle])
+
AC_CONFIG_FILES(m4_flatten([
breakpad.pc
breakpad-client.pc