зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1373878 - part 1 - add --enable-rust-tests configure option; r=rillian
Because Rust tests require panic=unwind crates and therefore recompiling all crates we normally use (since most of our crates use panic=abort), we've elected to enable Rust tests only if the user asks for it. Hence, this configure option. The configure option also enables build-time execution of the crates, since it's not straightforward to determine at configure time the name of the test binary Cargo will produce (Cargo produces test binaries of the form ${NAME}-${HEX_FINGERPRINT}, but there's no way to determine what ${HEX_FINGERPRINT} is without actually compiling the test binary).
This commit is contained in:
Родитель
6c72c8afb3
Коммит
2d3d2c4950
|
@ -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)))
|
||||
|
|
Загрузка…
Ссылка в новой задаче