From 6c251b857604e70626adfc10dddd3ddb8d039fa2 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 20 Dec 2017 14:14:34 +0100 Subject: [PATCH] rust: add --enable-rust-debug Add option to put Rust code in non-'--release' mode, preserving debug symbols. Until now Suricata would have to be compiled with --enable-debug for this. --- configure.ac | 6 ++++++ rust/Makefile.am | 2 ++ 2 files changed, 8 insertions(+) diff --git a/configure.ac b/configure.ac index 98948498fd..1b94f7851a 100644 --- a/configure.ac +++ b/configure.ac @@ -2098,6 +2098,11 @@ ]) AC_SUBST(RUST_FEATURES) + AC_ARG_ENABLE(rust_debug, + AS_HELP_STRING([--enable-rust-debug], [Rust not in --release mode]),,[enable_rust_debug=no]) + AM_CONDITIONAL([RUST_DEBUG], [test "x$enable_rust_debug" = "xyes"]) + AC_SUBST(RUST_DEBUG) + # get revision if test -f ./revision; then REVISION=`cat ./revision` @@ -2212,6 +2217,7 @@ SURICATA_BUILD_CONF="Suricata Configuration: Rust support (experimental): ${enable_rust} Experimental Rust parsers: ${enable_rust_experimental} Rust strict mode: ${enable_rust_strict} + Rust debug mode: ${enable_rust_debug} Suricatasc install: ${enable_python} diff --git a/rust/Makefile.am b/rust/Makefile.am index 52ec5a2602..370924603b 100644 --- a/rust/Makefile.am +++ b/rust/Makefile.am @@ -15,9 +15,11 @@ if HAVE_RUST_VENDOR FROZEN = --frozen endif +if !RUST_DEBUG if !DEBUG RELEASE = --release endif +endif if HAVE_LUA RUST_FEATURES += lua -- 2.47.2