mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Make Rust warnings conditionally fatal
Set rustc flags to treat warnings as fatal if configured with --enable-warnings.
This commit is contained in:
parent
945d871da5
commit
468bf58fa2
@ -462,6 +462,11 @@ if test "x$enable_rust" = "xyes"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
AC_DEFINE([HAVE_RUST], 1, [have Rust])
|
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
|
if test "x$enable_cargo_online_mode" = "xyes"; then
|
||||||
CARGO_ONLINE=
|
CARGO_ONLINE=
|
||||||
RUST_DL=#
|
RUST_DL=#
|
||||||
@ -515,6 +520,7 @@ if test "x$enable_rust" = "xyes"; then
|
|||||||
|
|
||||||
AC_SUBST(TOR_RUST_STATIC_NAME)
|
AC_SUBST(TOR_RUST_STATIC_NAME)
|
||||||
AC_SUBST(CARGO_ONLINE)
|
AC_SUBST(CARGO_ONLINE)
|
||||||
|
AC_SUBST(RUST_WARN)
|
||||||
AC_SUBST(RUST_DL)
|
AC_SUBST(RUST_DL)
|
||||||
|
|
||||||
dnl Let's check the rustc version, too
|
dnl Let's check the rustc version, too
|
||||||
|
@ -6,3 +6,6 @@
|
|||||||
|
|
||||||
@RUST_DL@ [source.vendored-sources]
|
@RUST_DL@ [source.vendored-sources]
|
||||||
@RUST_DL@ directory = '@TOR_RUST_DEPENDENCIES@'
|
@RUST_DL@ directory = '@TOR_RUST_DEPENDENCIES@'
|
||||||
|
|
||||||
|
@RUST_WARN@ [build]
|
||||||
|
@RUST_WARN@ rustflags = [ "-D", "warnings" ]
|
Loading…
Reference in New Issue
Block a user