Skip to content

Remove compiler-rt submodule from this repository #294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "compiler-rt"]
path = compiler-rt
url = https://github.com/rust-lang/compiler-rt
[submodule "libm"]
path = libm
url = https://github.com/rust-lang-nursery/libm
20 changes: 12 additions & 8 deletions build.rs
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ mod c {

use std::collections::BTreeMap;
use std::env;
use std::path::Path;
use std::path::PathBuf;

struct Sources {
// SYMBOL -> PATH TO SOURCE
@@ -411,15 +411,19 @@ mod c {
sources.remove(&["__aeabi_cdcmp", "__aeabi_cfcmp"]);
}

// When compiling in rustbuild (the rust-lang/rust repo) this build
// script runs from a directory other than this root directory.
let root = if cfg!(feature = "rustbuild") {
Path::new("../../libcompiler_builtins")
} else {
Path::new(".")
// When compiling the C code we require the user to tell us where the
// source code is, and this is largely done so when we're compiling as
// part of rust-lang/rust we can use the same llvm-project repository as
// rust-lang/rust.
let root = match env::var_os("RUST_COMPILER_RT_ROOT") {
Some(s) => PathBuf::from(s),
None => panic!("RUST_COMPILER_RT_ROOT is not set"),
};
if !root.exists() {
panic!("RUST_COMPILER_RT_ROOT={} does not exist", root.display());
}

let src_dir = root.join("compiler-rt/lib/builtins");
let src_dir = root.join("lib/builtins");
for (sym, src) in sources.map.iter() {
let src = src_dir.join(src);
cfg.file(&src);
12 changes: 7 additions & 5 deletions ci/azure-steps.yml
Original file line number Diff line number Diff line change
@@ -4,13 +4,15 @@ steps:

- template: azure-install-rust.yml

- script: rustup component add rust-src
displayName: Install Rust sources
condition: eq( variables['XARGO'], '1' )

- bash: rustup target add $TARGET
displayName: Install Rust target
condition: ne( variables['XARGO'], '1' )

- bash: |
set -e
curl -L https://github.com/rust-lang/llvm-project/archive/rustc/8.0-2019-03-18.tar.gz | \
tar xzf - --strip-components 1 llvm-project-rustc-8.0-2019-03-18/compiler-rt
echo '##vso[task.setvariable variable=RUST_COMPILER_RT_ROOT]./compiler-rt'
displayName: "Download compiler-rt reference sources"
- bash: ./ci/run.sh $TARGET
condition: ne( variables['Agent.OS'], 'Linux' )
1 change: 1 addition & 0 deletions ci/run-docker.sh
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@ run() {
--user $(id -u):$(id -g) \
-e CARGO_HOME=/cargo \
-e CARGO_TARGET_DIR=/target \
-e RUST_COMPILER_RT_ROOT \
-v $HOME/.cargo:/cargo \
-v `pwd`/target:/target \
-v `pwd`:/checkout:ro \
1 change: 0 additions & 1 deletion ci/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
set -ex

export CARGO_INCREMENTAL=0
cargo=cargo

# Test our implementation
1 change: 0 additions & 1 deletion compiler-rt
Submodule compiler-rt deleted from 03fc28