Skip to content

{compiler-builtins,libc} shim cleanup #44515

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
Oct 7, 2017
Merged
Show file tree
Hide file tree
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
19 changes: 17 additions & 2 deletions src/rustc/compiler_builtins_shim/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# See libc_shim/Cargo.toml for why this exists

[package]
name = "compiler_builtins"
authors = ["The Rust Project Developers"]
Expand All @@ -12,6 +10,23 @@ test = false
doctest = false

[dependencies]
# Specify the path to libcore; at the time of writing, removing this shim in
# favor of using compiler-builtins from git results in a compilation failure:
#
# Building stage0 std artifacts (x86_64-apple-darwin -> x86_64-apple-darwin)
# Compiling compiler_builtins v0.1.0 (https://github.com/rust-lang-nursery/compiler-builtins.git#23f14d3f)
# error[E0463]: can't find crate for `core`
#
# error: aborting due to previous error
#
# error: Could not compile `compiler_builtins`.
#
# Caused by:
# process didn't exit successfully: `/Users/tamird/src/rust/build/bootstrap/debug/rustc --crate-name compiler_builtins /Users/tamird/.cargo/git/checkouts/compiler-builtins-ec094dc45a0179c8/23f14d3/src/lib.rs --error-format json --crate-type lib --emit=dep-info,link -C opt-level=2 --cfg feature="c" --cfg feature="compiler-builtins" --cfg feature="default" --cfg feature="gcc" -C metadata=876d429e8d7eae1f -C extra-filename=-876d429e8d7eae1f --out-dir /Users/tamird/src/rust/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps --target x86_64-apple-darwin -L dependency=/Users/tamird/src/rust/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps -L dependency=/Users/tamird/src/rust/build/x86_64-apple-darwin/stage0-std/release/deps --cap-lints allow -L native=/Users/tamird/src/rust/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/build/compiler_builtins-f18fab55928102ad/out -l static=compiler-rt` (exit code: 101)
# thread 'main' panicked at 'command did not execute successfully: "/Users/tamird/src/rust/build/x86_64-apple-darwin/stage0/bin/cargo" "build" "-j" "4" "--target" "x86_64-apple-darwin" "--release" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/Users/tamird/src/rust/src/libstd/Cargo.toml" "--message-format" "json"
# expected success, got: exit code: 101', src/bootstrap/compile.rs:883:8
#
# See https://github.com/rust-lang/rfcs/pull/1133.
core = { path = "../../libcore" }

[build-dependencies]
Expand Down
13 changes: 5 additions & 8 deletions src/rustc/compiler_builtins_shim/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(warnings)]

// See comments in Cargo.toml for why this exists

fn main() {
println!("cargo:rustc-cfg=stdbuild");
println!("cargo:rerun-if-changed=build.rs");
}
// This file is left intentionally empty (and not removed) to avoid an issue
// where this crate is always considered dirty due to compiler-builtins'
// `cargo:rerun-if-changed=build.rs` directive; since the path is relative, it
// refers to this file when this shim crate is being built, and the absence of
// this file is considered by cargo to be equivalent to it having changed.