]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust: rebuilds std when building fuzzers 5417/head
authorPhilippe Antoine <contact@catenacyber.fr>
Wed, 9 Sep 2020 14:05:56 +0000 (16:05 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 11 Sep 2020 14:10:46 +0000 (16:10 +0200)
so as to have MSAN working

configure.ac
rust/Makefile.am

index 363fba5181ce683ced519f6d0a943aba7f573ad8..e9f4f91ad7720f091988e27c45ae2446929232f8 100644 (file)
     AC_ARG_ENABLE(fuzztargets,
         AS_HELP_STRING([--enable-fuzztargets], [Enable fuzz targets]),[enable_fuzztargets=$enableval],[enable_fuzztargets=no])
     AM_CONDITIONAL([BUILD_FUZZTARGETS], [test "x$enable_fuzztargets" = "xyes"])
+    AM_CONDITIONAL([RUST_BUILD_STD], [test "x$enable_fuzztargets" = "xyes" && echo $rust_compiler_version | grep -q nightly])
     AC_PROG_CXX
     AS_IF([test "x$enable_fuzztargets" = "xyes"], [
         AC_DEFINE([FUZZ], [1], [Fuzz targets are enabled])
index 843cac5c79f4e3c6d9c1d357df1bd8cfc47285d0..446a8981318ff4a54e59c4e2ad6125117fe0c279 100644 (file)
@@ -7,9 +7,13 @@ if HAVE_CARGO_VENDOR
 EXTRA_DIST +=  vendor
 endif
 
+if RUST_BUILD_STD
+RELEASE = -Z build-std
+else
 if !DEBUG
 RELEASE = --release
 endif
+endif
 
 if HAVE_LUA
 RUST_FEATURES +=       lua $(LUA_INT8)