Bug 1340587 - Remove MOZ_CARGO_SUPPORTS_FROZEN. r?froydnj draft
authorRalph Giles <giles@mozilla.com>
Fri, 17 Feb 2017 12:16:45 -0800
changeset 486287 a8e160dc9aed18b54431fa65ced874619b9230ab
parent 486102 df9a0acc26486790c8794b787c764654d32c3f9c
child 486339 3136f5b5dae16fbe0a38e219d7b81305a33b45de
push id45952
push userbmo:giles@thaumas.net
push dateFri, 17 Feb 2017 20:20:24 +0000
reviewersfroydnj
bugs1340587
milestone54.0a1
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
build/moz.configure/rust.configure
config/rules.mk
--- 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