mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Auto merge of #16601 - servo:cargoup, r=nox
Update to cargo 0.19.0-nightly (994e552 2017-04-25) This should be unblocked now: https://github.com/servo/servo/pull/15852#issuecomment-296379226 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16601) <!-- Reviewable:end -->
This commit is contained in:
commit
f1287814db
3 changed files with 24 additions and 5 deletions
|
@ -1 +1 @@
|
||||||
385e24360dc2c714e5f14bcc0e54afb87fc042d3
|
994e552f1f9515c84ec2ed66012bf3bd1684c206
|
|
@ -257,9 +257,6 @@ class CommandBase(object):
|
||||||
self.config["tools"].setdefault("system-cargo", False)
|
self.config["tools"].setdefault("system-cargo", False)
|
||||||
self.config["tools"].setdefault("rust-root", "")
|
self.config["tools"].setdefault("rust-root", "")
|
||||||
self.config["tools"].setdefault("cargo-root", "")
|
self.config["tools"].setdefault("cargo-root", "")
|
||||||
if not self.config["tools"]["system-cargo"]:
|
|
||||||
self.config["tools"]["cargo-root"] = path.join(
|
|
||||||
context.sharedir, "cargo", self.cargo_build_id())
|
|
||||||
self.config["tools"].setdefault("rustc-with-gold", get_env_bool("SERVO_RUSTC_WITH_GOLD", True))
|
self.config["tools"].setdefault("rustc-with-gold", get_env_bool("SERVO_RUSTC_WITH_GOLD", True))
|
||||||
|
|
||||||
# https://github.com/rust-lang/rust/pull/39754
|
# https://github.com/rust-lang/rust/pull/39754
|
||||||
|
@ -283,6 +280,7 @@ class CommandBase(object):
|
||||||
self.config["android"].setdefault("platform", "android-18")
|
self.config["android"].setdefault("platform", "android-18")
|
||||||
self.config["android"].setdefault("target", "arm-linux-androideabi")
|
self.config["android"].setdefault("target", "arm-linux-androideabi")
|
||||||
|
|
||||||
|
self.set_cargo_root()
|
||||||
self.set_use_stable_rust(False)
|
self.set_use_stable_rust(False)
|
||||||
|
|
||||||
_use_stable_rust = False
|
_use_stable_rust = False
|
||||||
|
@ -290,6 +288,11 @@ class CommandBase(object):
|
||||||
_rust_version_is_stable = False
|
_rust_version_is_stable = False
|
||||||
_cargo_build_id = None
|
_cargo_build_id = None
|
||||||
|
|
||||||
|
def set_cargo_root(self):
|
||||||
|
if not self.config["tools"]["system-cargo"]:
|
||||||
|
self.config["tools"]["cargo-root"] = path.join(
|
||||||
|
self.context.sharedir, "cargo", self.cargo_build_id())
|
||||||
|
|
||||||
def set_use_stable_rust(self, use_stable_rust=True):
|
def set_use_stable_rust(self, use_stable_rust=True):
|
||||||
self._use_stable_rust = use_stable_rust
|
self._use_stable_rust = use_stable_rust
|
||||||
if not self.config["tools"]["system-rust"]:
|
if not self.config["tools"]["system-rust"]:
|
||||||
|
|
|
@ -233,7 +233,7 @@ class MachCommands(CommandBase):
|
||||||
commit = json.load(urllib2.urlopen(url))["object"]["sha"]
|
commit = json.load(urllib2.urlopen(url))["object"]["sha"]
|
||||||
filename = path.join(self.context.topdir, "rust-commit-hash")
|
filename = path.join(self.context.topdir, "rust-commit-hash")
|
||||||
with open(filename, "w") as f:
|
with open(filename, "w") as f:
|
||||||
f.write(commit)
|
f.write(commit + "\n")
|
||||||
|
|
||||||
# Reset self.config["tools"]["rust-root"]
|
# Reset self.config["tools"]["rust-root"]
|
||||||
self._rust_version = None
|
self._rust_version = None
|
||||||
|
@ -241,6 +241,22 @@ class MachCommands(CommandBase):
|
||||||
|
|
||||||
self.fetch()
|
self.fetch()
|
||||||
|
|
||||||
|
@Command('cargoup',
|
||||||
|
description='Update the Cargo version to latest master',
|
||||||
|
category='devenv')
|
||||||
|
def cargoup(self):
|
||||||
|
url = "https://api.github.com/repos/rust-lang/cargo/git/refs/heads/master"
|
||||||
|
commit = json.load(urllib2.urlopen(url))["object"]["sha"]
|
||||||
|
filename = path.join(self.context.topdir, "cargo-commit-hash")
|
||||||
|
with open(filename, "w") as f:
|
||||||
|
f.write(commit + "\n")
|
||||||
|
|
||||||
|
# Reset self.config["tools"]["cargo-root"]
|
||||||
|
self._cargo_build_id = None
|
||||||
|
self.set_cargo_root()
|
||||||
|
|
||||||
|
self.fetch()
|
||||||
|
|
||||||
@Command('fetch',
|
@Command('fetch',
|
||||||
description='Fetch Rust, Cargo and Cargo dependencies',
|
description='Fetch Rust, Cargo and Cargo dependencies',
|
||||||
category='devenv')
|
category='devenv')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue