]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust: add --enable-rust-debug
authorVictor Julien <victor@inliniac.net>
Wed, 20 Dec 2017 13:14:34 +0000 (14:14 +0100)
committerVictor Julien <victor@inliniac.net>
Wed, 20 Dec 2017 14:53:13 +0000 (15:53 +0100)
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
rust/Makefile.am

index 98948498fdb3c057f94023c8e3248c5b1ca9468b..1b94f7851a3e4aafcf985293ac118f5b36231157 100644 (file)
     ])
     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}
 
index 52ec5a2602626be688e8898eaa824eb0cc6e2000..370924603b4b5e4eb5552993a9995b51053b50b0 100644 (file)
@@ -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