Skip to content

Commit e5acb0c

Browse files
committed
Auto merge of #48799 - alexcrichton:more-osx-cores, r=Mark-Simulacrum
travis: Upgrade OSX builders This upgrades the OSX builders to the `xcode9.3-moar` image which has 3 cores as opposed to the 2 that our builders currently have. Should help make those OSX builds a bit speedier!
2 parents cd6e30b + 55a2fdf commit e5acb0c

File tree

5 files changed

+70
-19
lines changed

5 files changed

+70
-19
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ matrix:
5656
NO_LLVM_ASSERTIONS=1
5757
NO_DEBUG_ASSERTIONS=1
5858
os: osx
59-
osx_image: xcode9.2
59+
osx_image: xcode9.3-moar
6060
if: branch = auto
6161
6262
- env: >
@@ -70,7 +70,7 @@ matrix:
7070
NO_LLVM_ASSERTIONS=1
7171
NO_DEBUG_ASSERTIONS=1
7272
os: osx
73-
osx_image: xcode9.2
73+
osx_image: xcode9.3-moar
7474
if: branch = auto
7575
7676
# OSX builders producing releases. These do not run the full test suite and

src/test/debuginfo/lexical-scope-with-macro.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
// min-lldb-version: 310
12+
// ignore-macos FIXME #48807
1213

1314
// compile-flags:-g -Zdebug-macros
1415

Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-include ../tools.mk
22

33
all:
4-
$(RUSTC) foo.rs -g
4+
$(RUSTC) foo.rs -g -O
55
RUSTC="$(RUSTC_ORIGINAL)" $(call RUN,foo)

src/test/run-make/reproducible-build/Makefile

+12-16
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,27 @@ all: \
1010

1111
smoke:
1212
rm -rf $(TMPDIR) && mkdir $(TMPDIR)
13+
$(RUSTC) linker.rs -O
1314
$(RUSTC) reproducible-build-aux.rs
14-
$(RUSTC) reproducible-build.rs -o"$(TMPDIR)/reproducible-build1"
15-
$(RUSTC) reproducible-build.rs -o"$(TMPDIR)/reproducible-build2"
16-
$(B2)
17-
nm "$(TMPDIR)/reproducible-build1" | sort > "$(TMPDIR)/reproducible-build1.nm"
18-
nm "$(TMPDIR)/reproducible-build2" | sort > "$(TMPDIR)/reproducible-build2.nm"
19-
cmp "$(TMPDIR)/reproducible-build1.nm" "$(TMPDIR)/reproducible-build2.nm" || exit 1
15+
$(RUSTC) reproducible-build.rs -C linker=$(call RUN_BINFILE,linker)
16+
$(RUSTC) reproducible-build.rs -C linker=$(call RUN_BINFILE,linker)
17+
diff -u "$(TMPDIR)/linker-arguments1" "$(TMPDIR)/linker-arguments2"
2018

2119
debug:
2220
rm -rf $(TMPDIR) && mkdir $(TMPDIR)
21+
$(RUSTC) linker.rs -O
2322
$(RUSTC) reproducible-build-aux.rs -g
24-
$(RUSTC) reproducible-build.rs -o"$(TMPDIR)/reproducible-build1" -g
25-
$(RUSTC) reproducible-build.rs -o"$(TMPDIR)/reproducible-build2" -g
26-
nm "$(TMPDIR)/reproducible-build1" | sort > "$(TMPDIR)/reproducible-build1-debug.nm"
27-
nm "$(TMPDIR)/reproducible-build2" | sort > "$(TMPDIR)/reproducible-build2-debug.nm"
28-
cmp "$(TMPDIR)/reproducible-build1-debug.nm" "$(TMPDIR)/reproducible-build2-debug.nm" || exit 1
23+
$(RUSTC) reproducible-build.rs -C linker=$(call RUN_BINFILE,linker) -g
24+
$(RUSTC) reproducible-build.rs -C linker=$(call RUN_BINFILE,linker) -g
25+
diff -u "$(TMPDIR)/linker-arguments1" "$(TMPDIR)/linker-arguments2"
2926

3027
opt:
3128
rm -rf $(TMPDIR) && mkdir $(TMPDIR)
29+
$(RUSTC) linker.rs -O
3230
$(RUSTC) reproducible-build-aux.rs -O
33-
$(RUSTC) reproducible-build.rs -o"$(TMPDIR)/reproducible-build1" -O
34-
$(RUSTC) reproducible-build.rs -o"$(TMPDIR)/reproducible-build2" -O
35-
nm "$(TMPDIR)/reproducible-build1" | sort > "$(TMPDIR)/reproducible-build1-opt.nm"
36-
nm "$(TMPDIR)/reproducible-build2" | sort > "$(TMPDIR)/reproducible-build2-opt.nm"
37-
cmp "$(TMPDIR)/reproducible-build1-opt.nm" "$(TMPDIR)/reproducible-build2-opt.nm" || exit 1
31+
$(RUSTC) reproducible-build.rs -C linker=$(call RUN_BINFILE,linker) -O
32+
$(RUSTC) reproducible-build.rs -C linker=$(call RUN_BINFILE,linker) -O
33+
diff -u "$(TMPDIR)/linker-arguments1" "$(TMPDIR)/linker-arguments2"
3834

3935
link_paths:
4036
rm -rf $(TMPDIR) && mkdir $(TMPDIR)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
use std::env;
12+
use std::path::Path;
13+
use std::fs::File;
14+
use std::io::{Read, Write};
15+
16+
fn main() {
17+
let mut dst = env::current_exe().unwrap();
18+
dst.pop();
19+
dst.push("linker-arguments1");
20+
if dst.exists() {
21+
dst.pop();
22+
dst.push("linker-arguments2");
23+
assert!(!dst.exists());
24+
}
25+
26+
let mut out = String::new();
27+
for arg in env::args().skip(1) {
28+
let path = Path::new(&arg);
29+
if !path.is_file() {
30+
out.push_str(&arg);
31+
out.push_str("\n");
32+
continue
33+
}
34+
35+
let mut contents = Vec::new();
36+
File::open(path).unwrap().read_to_end(&mut contents).unwrap();
37+
38+
out.push_str(&format!("{}: {}\n", arg, hash(&contents)));
39+
}
40+
41+
File::create(dst).unwrap().write_all(out.as_bytes()).unwrap();
42+
}
43+
44+
// fnv hash for now
45+
fn hash(contents: &[u8]) -> u64 {
46+
let mut hash = 0xcbf29ce484222325;
47+
48+
for byte in contents {
49+
hash = hash ^ (*byte as u64);
50+
hash = hash.wrapping_mul(0x100000001b3);
51+
}
52+
53+
hash
54+
}

0 commit comments

Comments
 (0)