Bug 1340587 - Remove MOZ_CARGO_SUPPORTS_FROZEN. r?froydnj
We now require cargo by version, and the minimum (0.16)
supports --frozen, so we don't need to check for this.
MozReview-Commit-ID: GPoadLkhRO5
--- a/build/moz.configure/rust.configure
+++ b/build/moz.configure/rust.configure
@@ -38,34 +38,16 @@ def cargo_info(cargo):
if not m:
die('Could not determine cargo version from output: %s', out)
version = m.group(1)
return namespace(
version=Version(version),
)
-@depends_if(cargo)
-@checking('cargo support for --frozen')
-@imports('subprocess')
-@imports('os')
-def cargo_supports_frozen(cargo):
- try:
- lines = subprocess.check_output(
- [cargo, 'help', 'build']
- ).splitlines()
- supported = any(' --frozen' in l for l in lines)
- if 'MOZ_AUTOMATION' in os.environ and not supported:
- die('cargo in automation must support --frozen')
- return supported
- except subprocess.CalledProcessError as e:
- die('Failed to call cargo: %s', e.message)
-
-set_config('MOZ_CARGO_SUPPORTS_FROZEN', cargo_supports_frozen)
-
@depends(rustc, cargo, rustc_info)
@imports(_from='textwrap', _import='dedent')
def rust_compiler(rustc, cargo, rustc_info):
if not rustc:
die(dedent('''\
Rust compiler not found.
To compile rust language sources, you must have 'rustc' in your path.
See https//www.rust-lang.org/ for more information.
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -896,19 +896,17 @@ ifdef MOZ_RUST
cargo_host_flag := --target=$(RUST_HOST_TARGET)
cargo_target_flag := --target=$(RUST_TARGET)
# Permit users to pass flags to cargo from their mozconfigs (e.g. --color=always).
cargo_build_flags = $(CARGOFLAGS)
ifndef MOZ_DEBUG
cargo_build_flags = --release
endif
-ifdef MOZ_CARGO_SUPPORTS_FROZEN
cargo_build_flags += --frozen
-endif
cargo_build_flags += --manifest-path $(CARGO_FILE)
ifdef BUILD_VERBOSE_LOG
cargo_build_flags += --verbose
endif
# Enable color output if original stdout was a TTY and color settings
# aren't already present. This essentially restores the default behavior