Skip to content

Commit ebbc9ea

Browse files
committed
Auto merge of #42410 - nagisa:llvmup, r=sanxiyn
Upgrade LLVM Includes rust-lang/llvm#80
2 parents 787d9da + 406eddf commit ebbc9ea

File tree

7 files changed

+35
-2
lines changed

7 files changed

+35
-2
lines changed

src/bootstrap/check.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ pub fn compiletest(build: &Build,
245245
let llvm_config = build.llvm_config(target);
246246
let llvm_version = output(Command::new(&llvm_config).arg("--version"));
247247
cmd.arg("--llvm-version").arg(llvm_version);
248+
if !build.is_rust_llvm(target) {
249+
cmd.arg("--system-llvm");
250+
}
248251

249252
cmd.args(&build.flags.cmd.test_args());
250253

src/rustllvm/llvm-rebuild-trigger

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# If this file is modified, then llvm will be (optionally) cleaned and then rebuilt.
22
# The actual contents of this file do not matter, but to trigger a change on the
33
# build bots then the contents should be changed so git updates the mtime.
4-
2017-05-13
4+
2017-06-03
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright 2017 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+
// no-system-llvm
12+
// compile-flags: -O
13+
#![crate_type="lib"]
14+
15+
#[no_mangle]
16+
pub fn alloc_test(data: u32) {
17+
// CHECK-LABEL: @alloc_test
18+
// CHECK-NEXT: start:
19+
// CHECK-NEXT: ret void
20+
let x = Box::new(data);
21+
drop(x);
22+
}

src/tools/compiletest/src/common.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ pub struct Config {
166166
// Version of LLVM
167167
pub llvm_version: Option<String>,
168168

169+
// Is LLVM a system LLVM
170+
pub system_llvm: bool,
171+
169172
// Path to the android tools
170173
pub android_cross_path: PathBuf,
171174

src/tools/compiletest/src/header.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ impl EarlyProps {
166166
}
167167

168168
fn ignore_llvm(config: &Config, line: &str) -> bool {
169+
if config.system_llvm && line.starts_with("no-system-llvm") {
170+
return true;
171+
}
169172
if let Some(ref actual_version) = config.llvm_version {
170173
if line.starts_with("min-llvm-version") {
171174
let min_version = line.trim_right()

src/tools/compiletest/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
9797
optopt("", "gdb", "path to GDB to use for GDB debuginfo tests", "PATH"),
9898
optopt("", "lldb-version", "the version of LLDB used", "VERSION STRING"),
9999
optopt("", "llvm-version", "the version of LLVM used", "VERSION STRING"),
100+
optflag("", "system-llvm", "is LLVM the system LLVM"),
100101
optopt("", "android-cross-path", "Android NDK standalone path", "PATH"),
101102
optopt("", "adb-path", "path to the android debugger", "PATH"),
102103
optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"),
@@ -183,6 +184,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
183184
gdb_native_rust: gdb_native_rust,
184185
lldb_version: extract_lldb_version(matches.opt_str("lldb-version")),
185186
llvm_version: matches.opt_str("llvm-version"),
187+
system_llvm: matches.opt_present("system-llvm"),
186188
android_cross_path: opt_path(matches, "android-cross-path"),
187189
adb_path: opt_str2(matches.opt_str("adb-path")),
188190
adb_test_dir: opt_str2(matches.opt_str("adb-test-dir")),

0 commit comments

Comments
 (0)