]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #34743 - badboy:llvm-upgrade, r=eddyb
authorbors <bors@rust-lang.org>
Mon, 1 Aug 2016 11:47:48 +0000 (04:47 -0700)
committerGitHub <noreply@github.com>
Mon, 1 Aug 2016 11:47:48 +0000 (04:47 -0700)
LLVM upgrade

As discussed in https://internals.rust-lang.org/t/need-help-with-emscripten-port/3154/46 I'm trying to update the used LLVM checkout in Rust.

I basically took @shepmaster's code and applied it on top (though I did the commits manually, the [original commits have better descriptions](https://github.com/rust-lang/rust/compare/master...avr-rust:avr-support).

With these changes I was able to build rustc. `make check` throws one last error on `run-pass/issue-28950.rs`. Output: https://gist.github.com/badboy/bcdd3bbde260860b6159aa49070a9052

I took the metadata changes as is and they seem to work, though it now uses the module in another step. I'm not sure if this is the best and correct way.

Things to do:

* [x] ~~Make `run-pass/issue-28950.rs` pass~~ unrelated
* [x] Find out how the `PositionIndependentExecutable` setting is now used
* [x] Is the `llvm::legacy` still the right way to do these things?

cc @brson @alexcrichton

1  2 
configure
src/librustc_back/target/aarch64_linux_android.rs
src/librustc_back/target/aarch64_unknown_linux_gnu.rs

diff --combined configure
index a7e24a506fbef989170e3dfd346545594df1ee31,3e2cbcbe3644253d10d3698e28c3e12932593191..d4bd16167d35cba350c1e042b12e1b189a8a720a
+++ b/configure
              err "bad LLVM version: $LLVM_VERSION, need >=3.7"
              ;;
      esac
+     if "$CFG_LLVM_ROOT/bin/llvm-mc" -help | grep -- "-relocation-model"; then
+         msg "found older llvm-mc"
+         CFG_LLVM_MC_HAS_RELOCATION_MODEL=1
+         putvar CFG_LLVM_MC_HAS_RELOCATION_MODEL
+     fi
  fi
  
  # Even when the user overrides the choice of CC, still try to detect
              ;;
  
  
 -        x86_64-*-musl)
 +        x86_64-*-musl | arm-*-musleabi)
              if [ ! -f $CFG_MUSL_ROOT/lib/libc.a ]
              then
                  err "musl libc $CFG_MUSL_ROOT/lib/libc.a not found"
index 307823137a71090a81cc3aba6bdc1c7a8737446b,a5be1a227f1eafbc21dd92c422125fe9075e5342..7f54dab5b5385faa87e0185ab446712dec3cdcbc
@@@ -8,23 -8,23 +8,23 @@@
  // option. This file may not be copied, modified, or distributed
  // except according to those terms.
  
 -use target::Target;
 +use target::{Target, TargetResult};
  
 -pub fn target() -> Target {
 +pub fn target() -> TargetResult {
      let mut base = super::android_base::opts();
      base.max_atomic_width = 128;
      // As documented in http://developer.android.com/ndk/guides/cpu-features.html
      // the neon (ASIMD) and FP must exist on all android aarch64 targets.
      base.features = "+neon,+fp-armv8".to_string();
 -    Target {
 +    Ok(Target {
          llvm_target: "aarch64-linux-android".to_string(),
          target_endian: "little".to_string(),
          target_pointer_width: "64".to_string(),
-         data_layout: "e-m:e-i64:64-i128:128-n32:64-S128".to_string(),
+         data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
          arch: "aarch64".to_string(),
          target_os: "android".to_string(),
          target_env: "".to_string(),
          target_vendor: "unknown".to_string(),
          options: base,
 -    }
 +    })
  }
index 14d0c8bedec1c7ddc9f54e95ec0c9998280c2fd9,2dc9355e22f0d9a1d6d3e94efab1bb184267bdc8..cca965f9d4ff16c0c52d40f16c781c12171f953b
@@@ -8,20 -8,20 +8,20 @@@
  // option. This file may not be copied, modified, or distributed
  // except according to those terms.
  
 -use target::Target;
 +use target::{Target, TargetResult};
  
 -pub fn target() -> Target {
 +pub fn target() -> TargetResult {
      let mut base = super::linux_base::opts();
      base.max_atomic_width = 128;
 -    Target {
 +    Ok(Target {
          llvm_target: "aarch64-unknown-linux-gnu".to_string(),
          target_endian: "little".to_string(),
          target_pointer_width: "64".to_string(),
          target_env: "gnu".to_string(),
-         data_layout: "e-m:e-i64:64-i128:128-n32:64-S128".to_string(),
+         data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
          arch: "aarch64".to_string(),
          target_os: "linux".to_string(),
          target_vendor: "unknown".to_string(),
          options: base,
 -    }
 +    })
  }