servo: Merge #18420 - Get rustc commit hash from channel manifest (from servo:toml); r=nox,emilio
authorSimon Sapin <simon.sapin@exyr.org>
Tue, 12 Sep 2017 05:01:24 -0500
changeset 429860 b674d9f6d1d65fba6b68cb847619d1c7d84c0d4c
parent 429859 677faa177ebc16854c79dc82e7ecc5c3e8a86e46
child 429861 f1e8596a1f896fd07097012285d6a13ca8b8c188
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnox, emilio
bugs18420, 44218
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
servo: Merge #18420 - Get rustc commit hash from channel manifest (from servo:toml); r=nox,emilio … 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). Source-Repo: https://github.com/servo/servo Source-Revision: af077a722225193b38d80622fb939b7719b46db0
servo/components/style/bloom.rs
servo/components/style/sharing/mod.rs
servo/python/servo/bootstrap_commands.py
servo/python/servo/devenv_commands.py
servo/rust-toolchain
--- a/servo/components/style/bloom.rs
+++ b/servo/components/style/bloom.rs
@@ -116,16 +116,22 @@ impl<E: TElement> Drop for StyleBloom<E>
         self.clear();
     }
 }
 
 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());
         debug_assert!(filter.is_zeroed(), "Forgot to zero the bloom filter last time");
         StyleBloom {
             filter: filter,
             elements: Default::default(),
             pushed_hashes: Default::default(),
--- a/servo/components/style/sharing/mod.rs
+++ b/servo/components/style/sharing/mod.rs
@@ -473,16 +473,22 @@ impl<E: TElement> StyleSharingCache<E> {
     }
 
     fn cache_mut(&mut self) -> &mut SharingCache<E> {
         let base: &mut TypelessSharingCache = &mut *self.cache_typeless;
         unsafe { mem::transmute(base) }
     }
 
     /// 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>());
         let cache_arc = SHARING_CACHE_KEY.with(|c| c.clone());
         let cache = OwningHandle::new_with_fn(cache_arc, |x| unsafe { x.as_ref() }.unwrap().borrow_mut());
         debug_assert!(cache.is_empty());
 
         StyleSharingCache {
--- a/servo/python/servo/bootstrap_commands.py
+++ b/servo/python/servo/bootstrap_commands.py
@@ -85,22 +85,18 @@ class MachCommands(CommandBase):
             # rustc-nightly-HOST-TRIPLE.tar.gz, whereas the stable compiler is named
             # rustc-VERSION-HOST-TRIPLE.tar.gz. We just need to pull down and extract it,
             # giving a directory name that will be the same as the tarball name (rustc is
             # in that directory).
             if stable:
                 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"]:
                     base_url += "-alt"
                 base_url += "/" + nightly_commit_hash
 
             rustc_url = base_url + "/rustc-%s-%s.tar.gz" % (version, host_triple())
             tgz_file = rust_dir + '-rustc.tar.gz'
--- a/servo/python/servo/devenv_commands.py
+++ b/servo/python/servo/devenv_commands.py
@@ -257,17 +257,17 @@ class MachCommands(CommandBase):
         return call(
             ["git"] + ["grep"] + params + ['--'] + grep_paths + [':(exclude)*.min.js', ':(exclude)*.min.css'],
             env=self.build_env())
 
     @Command('rustup',
              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:
             f.write("nightly-%s\n" % nightly_date)
 
         # Reset self.config["tools"]["rust-root"] and self.config["tools"]["cargo-root"]
         self._rust_nightly_date = None
         self.set_use_stable_rust(False)
--- a/servo/rust-toolchain
+++ b/servo/rust-toolchain
@@ -1,1 +1,1 @@
-nightly-2017-08-31
+nightly-2017-09-08