Skip to content

Commit 0cf6ddf

Browse files
committed
Auto merge of #44338 - kennytm:xcode9, r=<try>
[WIP] [DO NOT MERGE] Change the Travis CI macOS Xcode version to 9.0 Just to experiment if it can make #44221 appear less often.
2 parents 2f1ef9e + 508f9ca commit 0cf6ddf

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

.travis.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ matrix:
1313
include:
1414
# Images used in testing PR and try-build should be run first.
1515
- env: IMAGE=x86_64-gnu-llvm-3.7 ALLOW_PR=1 RUST_BACKTRACE=1
16-
- env: IMAGE=dist-x86_64-linux DEPLOY=1 ALLOW_TRY=1
16+
- env: IMAGE=dist-x86_64-linux DEPLOY=1 ALLOW_TRY=0
1717

1818
# "alternate" deployments, these are "nightlies" but don't have assertions
1919
# turned on, they're deployed to a different location primarily for projects
@@ -37,7 +37,7 @@ matrix:
3737
# OSX builders running tests, these run the full test suite.
3838
#
3939
# Note that the compiler is compiled to target 10.8 here because the Xcode
40-
# version that we're using, 8.2, cannot compile LLVM for OSX 10.7.
40+
# version that we're using, 9.0, cannot compile LLVM for OSX 10.7.
4141
- env: >
4242
RUST_CHECK_TARGET=check
4343
RUST_CONFIGURE_ARGS="--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler"
@@ -46,8 +46,9 @@ matrix:
4646
SCCACHE_ERROR_LOG=/tmp/sccache.log
4747
MACOSX_DEPLOYMENT_TARGET=10.8
4848
MACOSX_STD_DEPLOYMENT_TARGET=10.7
49+
ALLOW_TRY=1
4950
os: osx
50-
osx_image: xcode8.2
51+
osx_image: xcode9
5152
- env: >
5253
RUST_CHECK_TARGET=check
5354
RUST_CONFIGURE_ARGS=--build=i686-apple-darwin
@@ -56,8 +57,9 @@ matrix:
5657
SCCACHE_ERROR_LOG=/tmp/sccache.log
5758
MACOSX_DEPLOYMENT_TARGET=10.8
5859
MACOSX_STD_DEPLOYMENT_TARGET=10.7
60+
ALLOW_TRY=1
5961
os: osx
60-
osx_image: xcode8.2
62+
osx_image: xcode9
6163
6264
# OSX builders producing releases. These do not run the full test suite and
6365
# just produce a bunch of artifacts.

src/bootstrap/native.rs

+10-1
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,18 @@ impl Step for Llvm {
224224
.define("CMAKE_CXX_COMPILER", sanitize_cc(cxx));
225225
}
226226

227+
let mut cxx_flags = build.cflags(target).join(" ");
228+
if target.contains("apple") {
229+
// `futimens` is introduced in macOS 10.13. The header file that supports 10.13 is
230+
// included in Xcode 9. If we try to build using Xcode 9 on 10.12, `librust_llvm`
231+
// will fail with a linker error.
232+
cxx_flags += " -UHAVE_FUTIMENS";
233+
}
234+
227235
cfg.build_arg("-j").build_arg(build.jobs().to_string());
228236
cfg.define("CMAKE_C_FLAGS", build.cflags(target).join(" "));
229-
cfg.define("CMAKE_CXX_FLAGS", build.cflags(target).join(" "));
237+
cfg.define("CMAKE_CXX_FLAGS", cxx_flags);
238+
230239
};
231240

232241
configure_compilers(&mut cfg);

0 commit comments

Comments
 (0)