Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@ryansg.com>2019-12-04 09:57:08 -0500
committerMike Gerwitz <mike.gerwitz@ryansg.com>2020-02-24 14:56:28 -0500
commit0147cb7cb4972405a683fed581533d3508c23a07 (patch)
tree5243b67f7647d697438b51f6eddddea29ed80eb8 /tamer/configure.ac
parent0acc21f16f098b2784b1382b82816889d694f91a (diff)
downloadtame-0147cb7cb4972405a683fed581533d3508c23a07.tar.gz
tame-0147cb7cb4972405a683fed581533d3508c23a07.tar.bz2
tame-0147cb7cb4972405a683fed581533d3508c23a07.zip
Makefile.am (bench): New target
The configure script will determine if nightly is required for running benchmarks, because `test` is currently an unstable feature.
Diffstat (limited to 'tamer/configure.ac')
-rw-r--r--tamer/configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/tamer/configure.ac b/tamer/configure.ac
index 350b77b..f2a1bff 100644
--- a/tamer/configure.ac
+++ b/tamer/configure.ac
@@ -55,6 +55,16 @@ AX_COMPARE_VERSION([$rustc_version], [ge], [$rustc_ver_req],
AC_ARG_VAR([CARGO_BUILD_FLAGS],
[Flags to be passed to `cargo build' when invoked via Make])
+# The `test` feature is required for benchmarking. If unavailable, then
+# it's still an unstable feature and we'll need to use nightly. We don't
+# check for nightly here, though---if it's missing, then cargo will tell the
+# user what to do.
+AC_MSG_CHECKING([`test` feature support])
+AS_IF(["$RUSTC" --crate-type lib build_aux/bench_check.rs &>/dev/null],
+ [AC_MSG_RESULT(available)],
+ [AC_MSG_RESULT([no (nightly required)])
+ AC_SUBST([CARGO_BENCH_FLAGS], [+nightly])])
+
# Cargo commands may be available but not necessarily installed for the
# active toolchain. Let's check that.
AC_MSG_CHECKING([whether cargo-fmt is available for active toolchain])