Auto merge of #18420 - servo:toml, r=nox,emilio

Get rustc commit hash from channel manifest

… added in https://github.com/rust-lang/rust/pull/44218, instead of using the GitHub API.

Also upgrade to rustc 1.22.0-nightly (d93036a04 2017-09-07).

<!-- 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/18420)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-09-12 05:01:24 -05:00 committed by GitHub
commit af077a7222
5 changed files with 15 additions and 7 deletions

View file

@ -121,6 +121,12 @@ impl<E: TElement> StyleBloom<E> {
/// Create an empty `StyleBloom`. Because StyleBloom acquires the thread-
/// local filter buffer, creating multiple live StyleBloom instances at
/// the same time on the same thread will panic.
// Forced out of line to limit stack frame sizes after extra inlining from
// https://github.com/rust-lang/rust/pull/43931
//
// See https://github.com/servo/servo/pull/18420#issuecomment-328769322
#[inline(never)]
pub fn new() -> Self {
let bloom_arc = BLOOM_KEY.with(|b| b.clone());
let filter = OwningHandle::new_with_fn(bloom_arc, |x| unsafe { x.as_ref() }.unwrap().borrow_mut());

View file

@ -478,6 +478,12 @@ impl<E: TElement> StyleSharingCache<E> {
}
/// Create a new style sharing candidate cache.
// Forced out of line to limit stack frame sizes after extra inlining from
// https://github.com/rust-lang/rust/pull/43931
//
// See https://github.com/servo/servo/pull/18420#issuecomment-328769322
#[inline(never)]
pub fn new() -> Self {
assert_eq!(mem::size_of::<SharingCache<E>>(), mem::size_of::<TypelessSharingCache>());
assert_eq!(mem::align_of::<SharingCache<E>>(), mem::align_of::<TypelessSharingCache>());

View file

@ -90,12 +90,8 @@ class MachCommands(CommandBase):
base_url = static_s3
else:
import toml
import re
channel = "%s/%s/channel-rust-nightly.toml" % (static_s3, self.rust_nightly_date())
version_string = toml.load(urllib2.urlopen(channel))["pkg"]["rustc"]["version"]
short_commit = re.search("\(([0-9a-f]+) ", version_string).group(1)
commit_api = "https://api.github.com/repos/rust-lang/rust/commits/" + short_commit
nightly_commit_hash = json.load(urllib2.urlopen(commit_api))["sha"]
nightly_commit_hash = toml.load(urllib2.urlopen(channel))["pkg"]["rustc"]["git_commit_hash"]
base_url = "https://s3.amazonaws.com/rust-lang-ci/rustc-builds"
if not self.config["build"]["llvm-assertions"]:

View file

@ -262,7 +262,7 @@ class MachCommands(CommandBase):
description='Update the Rust version to latest Nightly',
category='devenv')
def rustup(self):
url = "https://static.rust-lang.org/dist/channel-rust-nightly-date.txt"
url = "https://static-rust-lang-org.s3.amazonaws.com/dist/channel-rust-nightly-date.txt"
nightly_date = urllib2.urlopen(url).read()
filename = path.join(self.context.topdir, "rust-toolchain")
with open(filename, "w") as f:

View file

@ -1 +1 @@
nightly-2017-08-31
nightly-2017-09-08