1
Fork 0

Rollup merge of #45326 - cuviper:min-llvm-3.9, r=alexcrichton

Bump the minimum LLVM to 3.9

Old LLVM bugs are reportedly cropping up harder, but 3.9 seems to be OK.

Fixes #45277.
This commit is contained in:
kennytm 2017-10-19 01:59:52 +08:00 committed by GitHub
commit c77068a94b
9 changed files with 20 additions and 19 deletions

View file

@ -12,7 +12,7 @@ matrix:
fast_finish: true fast_finish: true
include: include:
# Images used in testing PR and try-build should be run first. # Images used in testing PR and try-build should be run first.
- env: IMAGE=x86_64-gnu-llvm-3.7 RUST_BACKTRACE=1 - env: IMAGE=x86_64-gnu-llvm-3.9 RUST_BACKTRACE=1
if: type = pull_request OR branch = auto if: type = pull_request OR branch = auto
- env: IMAGE=dist-x86_64-linux DEPLOY=1 - env: IMAGE=dist-x86_64-linux DEPLOY=1

View file

@ -35,7 +35,7 @@
# If an external LLVM root is specified, we automatically check the version by # If an external LLVM root is specified, we automatically check the version by
# default to make sure it's within the range that we're expecting, but setting # default to make sure it's within the range that we're expecting, but setting
# this flag will indicate that this version check should not be done. # this flag will indicate that this version check should not be done.
#version-check = false #version-check = true
# Link libstdc++ statically into the librustc_llvm instead of relying on a # Link libstdc++ statically into the librustc_llvm instead of relying on a
# dynamic version to be available. # dynamic version to be available.

View file

@ -299,6 +299,7 @@ impl Config {
let mut config = Config::default(); let mut config = Config::default();
config.llvm_enabled = true; config.llvm_enabled = true;
config.llvm_optimize = true; config.llvm_optimize = true;
config.llvm_version_check = true;
config.use_jemalloc = true; config.use_jemalloc = true;
config.backtrace = true; config.backtrace = true;
config.rust_optimize = true; config.rust_optimize = true;

View file

@ -259,11 +259,14 @@ fn check_llvm_version(build: &Build, llvm_config: &Path) {
let mut cmd = Command::new(llvm_config); let mut cmd = Command::new(llvm_config);
let version = output(cmd.arg("--version")); let version = output(cmd.arg("--version"));
if version.starts_with("3.5") || version.starts_with("3.6") || let mut parts = version.split('.').take(2)
version.starts_with("3.7") { .filter_map(|s| s.parse::<u32>().ok());
return if let (Some(major), Some(minor)) = (parts.next(), parts.next()) {
if major > 3 || (major == 3 && minor >= 9) {
return
}
} }
panic!("\n\nbad LLVM version: {}, need >=3.5\n\n", version) panic!("\n\nbad LLVM version: {}, need >=3.9\n\n", version)
} }
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]

View file

@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \ cmake \
sudo \ sudo \
gdb \ gdb \
llvm-3.7-tools \ llvm-3.9-tools \
libedit-dev \ libedit-dev \
zlib1g-dev \ zlib1g-dev \
xz-utils xz-utils
@ -19,7 +19,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
COPY scripts/sccache.sh /scripts/ COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh RUN sh /scripts/sccache.sh
# using llvm-link-shared due to libffi issues -- see #34486
ENV RUST_CONFIGURE_ARGS \ ENV RUST_CONFIGURE_ARGS \
--build=x86_64-unknown-linux-gnu \ --build=x86_64-unknown-linux-gnu \
--llvm-root=/usr/lib/llvm-3.7 --llvm-root=/usr/lib/llvm-3.9 \
--enable-llvm-link-shared
ENV RUST_CHECK_TARGET check ENV RUST_CHECK_TARGET check

View file

@ -14,7 +14,6 @@
// ignore-arm // ignore-arm
// ignore-aarch64 // ignore-aarch64
// min-llvm-version 3.8
// compile-flags: -C no-prepopulate-passes // compile-flags: -C no-prepopulate-passes

View file

@ -8,14 +8,13 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
// The minimum LLVM version is set to 3.8, but really this test // This test depends on a patch that was committed to upstream LLVM
// depends on a patch that is was committed to upstream LLVM before // before 4.0, formerly backported to the Rust LLVM fork.
// 4.0; and also backported to the Rust LLVM fork.
// ignore-tidy-linelength // ignore-tidy-linelength
// ignore-windows // ignore-windows
// ignore-macos // ignore-macos
// min-llvm-version 3.8 // min-llvm-version 4.0
// compile-flags: -g -C no-prepopulate-passes // compile-flags: -g -C no-prepopulate-passes

View file

@ -8,14 +8,13 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
// The minimum LLVM version is set to 3.8, but really this test // This test depends on a patch that was committed to upstream LLVM
// depends on a patch that is was committed to upstream LLVM before // before 4.0, formerly backported to the Rust LLVM fork.
// 4.0; and also backported to the Rust LLVM fork.
// ignore-tidy-linelength // ignore-tidy-linelength
// ignore-windows // ignore-windows
// ignore-macos // ignore-macos
// min-llvm-version 3.8 // min-llvm-version 4.0
// compile-flags: -g -C no-prepopulate-passes // compile-flags: -g -C no-prepopulate-passes

View file

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
// min-llvm-version 3.9
use std::ops::Deref; use std::ops::Deref;
fn main() { fn main() {