Bug 1552021 - Add an option to turn off rust incremental compilation. r=froydnj

Differential Revision: https://phabricator.services.mozilla.com/D31341

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Chris Manchester 2019-05-17 23:00:30 +00:00
Родитель d65a4e80c9
Коммит 5fa8ca19bf
1 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -1910,11 +1910,18 @@ def rust_compile_flags(opt_level, debug_rust, debug_symbols):
# Rust incremental compilation
# ==============================================================
js_option('--disable-cargo-incremental',
help='Disable incremental rust compilation.')
@depends(rustc_opt_level, debug_rust, 'MOZ_AUTOMATION', code_coverage)
def cargo_incremental(opt_level, debug_rust, automation, code_coverage):
@depends(rustc_opt_level, debug_rust, 'MOZ_AUTOMATION', code_coverage,
'--disable-cargo-incremental')
def cargo_incremental(opt_level, debug_rust, automation, code_coverage,
enabled):
"""Return a value for the CARGO_INCREMENTAL environment variable."""
if not enabled:
return '0'
# We never want to use incremental compilation in automation. sccache
# handles our automation use case much better than incremental compilation
# would.