diff options
author | Taylor Yu <catalyst@torproject.org> | 2018-06-15 17:27:19 -0500 |
---|---|---|
committer | Taylor Yu <catalyst@torproject.org> | 2018-06-15 17:27:19 -0500 |
commit | 468bf58fa24d78bef8d0d017dcacb7da4c031c12 (patch) | |
tree | 358fd98a24adca2ae0cd148b572b5b9585fc7800 /configure.ac | |
parent | 945d871da54e6038fdabaf3b78a7a55b290ab6aa (diff) | |
download | tor-468bf58fa24d78bef8d0d017dcacb7da4c031c12.tar.gz tor-468bf58fa24d78bef8d0d017dcacb7da4c031c12.zip |
Make Rust warnings conditionally fatal
Set rustc flags to treat warnings as fatal if configured with
--enable-warnings.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index d554ba8e55..5269d9c42e 100644 --- a/configure.ac +++ b/configure.ac @@ -462,6 +462,11 @@ if test "x$enable_rust" = "xyes"; then fi AC_DEFINE([HAVE_RUST], 1, [have Rust]) + if test "x$enable_fatal_warnings" = "xyes"; then + RUST_WARN= + else + RUST_WARN=# + fi if test "x$enable_cargo_online_mode" = "xyes"; then CARGO_ONLINE= RUST_DL=# @@ -515,6 +520,7 @@ if test "x$enable_rust" = "xyes"; then AC_SUBST(TOR_RUST_STATIC_NAME) AC_SUBST(CARGO_ONLINE) + AC_SUBST(RUST_WARN) AC_SUBST(RUST_DL) dnl Let's check the rustc version, too |