Bug 1527797 - Relax rust build dependency for --enable-project=tools/crashreporter. r=dmajor

The tools/crashreporter project only builds one crate, that rarely
changes, and currently builds with rustc 1.22.

Differential Revision: https://phabricator.services.mozilla.com/D19756
This commit is contained in:
Mike Hommey 2019-02-14 18:00:38 +09:00
Родитель e94de1e008
Коммит 76a0504add
1 изменённых файлов: 8 добавлений и 4 удалений

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

@ -54,9 +54,9 @@ def cargo_info(cargo):
)
@depends(rustc_info, cargo_info)
@depends(rustc_info, cargo_info, build_project)
@imports(_from='textwrap', _import='dedent')
def rust_compiler(rustc_info, cargo_info):
def rust_compiler(rustc_info, cargo_info, build_project):
if not rustc_info:
die(dedent('''\
Rust compiler not found.
@ -66,8 +66,12 @@ def rust_compiler(rustc_info, cargo_info):
You can install rust by running './mach bootstrap'
or by directly running the installer from https://rustup.rs/
'''))
rustc_min_version = Version('1.32.0')
cargo_min_version = rustc_min_version
if build_project == 'tools/crashreporter':
rustc_min_version = Version('1.22.0')
cargo_min_version = Version('0.23.0')
else:
rustc_min_version = Version('1.32.0')
cargo_min_version = rustc_min_version
version = rustc_info.version
if version < rustc_min_version: