diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure index 90bb9dc67495..5744b4c80dd5 100644 --- a/build/moz.configure/rust.configure +++ b/build/moz.configure/rust.configure @@ -240,3 +240,10 @@ set_config('RUSTC_COMMIT', depends(rustc_info)(lambda i: i.commit)) # Until we remove all the other Rust checks in old-configure. add_old_configure_assignment('RUSTC', rustc) add_old_configure_assignment('RUST_TARGET', rust_target_triple) + +# This option is separate from --enable-tests because Rust tests are particularly +# expensive in terms of compile time (especially for code in libxul). +option('--enable-rust-tests', + help='Enable building of Rust tests, and build-time execution of them') + +set_config('MOZ_RUST_TESTS', depends('--enable-rust-tests')(lambda v: bool(v)))