Bug 1340587 - Remove MOZ_CARGO_SUPPORTS_FROZEN. r=froydnj
authorRalph Giles <giles@mozilla.com>
Fri, 17 Feb 2017 12:16:45 -0800
changeset 372684 71135678ea64bdedfb38b3ae4ddb2b9e2f4be12f
parent 372683 2ec4063be21eadf0ce448dddd363e769d31a1a10
child 372685 06cd86f16c70f2c1eae162f95deaa6460efc1cf4
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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