Auto merge of #42410 - nagisa:llvmup, r=sanxiyn
Upgrade LLVM Includes https://github.com/rust-lang/llvm/pull/80
This commit is contained in:
@@ -245,6 +245,9 @@ pub fn compiletest(build: &Build,
|
|||||||
let llvm_config = build.llvm_config(target);
|
let llvm_config = build.llvm_config(target);
|
||||||
let llvm_version = output(Command::new(&llvm_config).arg("--version"));
|
let llvm_version = output(Command::new(&llvm_config).arg("--version"));
|
||||||
cmd.arg("--llvm-version").arg(llvm_version);
|
cmd.arg("--llvm-version").arg(llvm_version);
|
||||||
|
if !build.is_rust_llvm(target) {
|
||||||
|
cmd.arg("--system-llvm");
|
||||||
|
}
|
||||||
|
|
||||||
cmd.args(&build.flags.cmd.test_args());
|
cmd.args(&build.flags.cmd.test_args());
|
||||||
|
|
||||||
|
|||||||
2
src/llvm
2
src/llvm
Submodule src/llvm updated: 1ef3b9128e...ee545e1d13
@@ -1,4 +1,4 @@
|
|||||||
# If this file is modified, then llvm will be (optionally) cleaned and then rebuilt.
|
# If this file is modified, then llvm will be (optionally) cleaned and then rebuilt.
|
||||||
# The actual contents of this file do not matter, but to trigger a change on the
|
# The actual contents of this file do not matter, but to trigger a change on the
|
||||||
# build bots then the contents should be changed so git updates the mtime.
|
# build bots then the contents should be changed so git updates the mtime.
|
||||||
2017-05-13
|
2017-06-03
|
||||||
|
|||||||
22
src/test/codegen/alloc-optimisation.rs
Normal file
22
src/test/codegen/alloc-optimisation.rs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
// file at the top-level directory of this distribution and at
|
||||||
|
// http://rust-lang.org/COPYRIGHT.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
// option. This file may not be copied, modified, or distributed
|
||||||
|
// except according to those terms.
|
||||||
|
//
|
||||||
|
// no-system-llvm
|
||||||
|
// compile-flags: -O
|
||||||
|
#![crate_type="lib"]
|
||||||
|
|
||||||
|
#[no_mangle]
|
||||||
|
pub fn alloc_test(data: u32) {
|
||||||
|
// CHECK-LABEL: @alloc_test
|
||||||
|
// CHECK-NEXT: start:
|
||||||
|
// CHECK-NEXT: ret void
|
||||||
|
let x = Box::new(data);
|
||||||
|
drop(x);
|
||||||
|
}
|
||||||
@@ -166,6 +166,9 @@ pub struct Config {
|
|||||||
// Version of LLVM
|
// Version of LLVM
|
||||||
pub llvm_version: Option<String>,
|
pub llvm_version: Option<String>,
|
||||||
|
|
||||||
|
// Is LLVM a system LLVM
|
||||||
|
pub system_llvm: bool,
|
||||||
|
|
||||||
// Path to the android tools
|
// Path to the android tools
|
||||||
pub android_cross_path: PathBuf,
|
pub android_cross_path: PathBuf,
|
||||||
|
|
||||||
|
|||||||
@@ -166,6 +166,9 @@ impl EarlyProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn ignore_llvm(config: &Config, line: &str) -> bool {
|
fn ignore_llvm(config: &Config, line: &str) -> bool {
|
||||||
|
if config.system_llvm && line.starts_with("no-system-llvm") {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if let Some(ref actual_version) = config.llvm_version {
|
if let Some(ref actual_version) = config.llvm_version {
|
||||||
if line.starts_with("min-llvm-version") {
|
if line.starts_with("min-llvm-version") {
|
||||||
let min_version = line.trim_right()
|
let min_version = line.trim_right()
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
|
|||||||
optopt("", "gdb", "path to GDB to use for GDB debuginfo tests", "PATH"),
|
optopt("", "gdb", "path to GDB to use for GDB debuginfo tests", "PATH"),
|
||||||
optopt("", "lldb-version", "the version of LLDB used", "VERSION STRING"),
|
optopt("", "lldb-version", "the version of LLDB used", "VERSION STRING"),
|
||||||
optopt("", "llvm-version", "the version of LLVM used", "VERSION STRING"),
|
optopt("", "llvm-version", "the version of LLVM used", "VERSION STRING"),
|
||||||
|
optflag("", "system-llvm", "is LLVM the system LLVM"),
|
||||||
optopt("", "android-cross-path", "Android NDK standalone path", "PATH"),
|
optopt("", "android-cross-path", "Android NDK standalone path", "PATH"),
|
||||||
optopt("", "adb-path", "path to the android debugger", "PATH"),
|
optopt("", "adb-path", "path to the android debugger", "PATH"),
|
||||||
optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"),
|
optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"),
|
||||||
@@ -183,6 +184,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
|
|||||||
gdb_native_rust: gdb_native_rust,
|
gdb_native_rust: gdb_native_rust,
|
||||||
lldb_version: extract_lldb_version(matches.opt_str("lldb-version")),
|
lldb_version: extract_lldb_version(matches.opt_str("lldb-version")),
|
||||||
llvm_version: matches.opt_str("llvm-version"),
|
llvm_version: matches.opt_str("llvm-version"),
|
||||||
|
system_llvm: matches.opt_present("system-llvm"),
|
||||||
android_cross_path: opt_path(matches, "android-cross-path"),
|
android_cross_path: opt_path(matches, "android-cross-path"),
|
||||||
adb_path: opt_str2(matches.opt_str("adb-path")),
|
adb_path: opt_str2(matches.opt_str("adb-path")),
|
||||||
adb_test_dir: opt_str2(matches.opt_str("adb-test-dir")),
|
adb_test_dir: opt_str2(matches.opt_str("adb-test-dir")),
|
||||||
|
|||||||
Reference in New Issue
Block a user