Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5f10bb5

Browse files
committedMar 8, 2017
Remove internal liblog
This commit deletes the internal liblog in favor of the implementation that lives on crates.io. Similarly it's also setting a convention for adding crates to the compiler. The main restriction right now is that we want compiler implementation details to be unreachable from normal Rust code (e.g. requires a feature), and by default everything in the sysroot is reachable via `extern crate`. The proposal here is to require that crates pulled in have these lines in their `src/lib.rs`: #![cfg_attr(rustbuild, feature(staged_api, rustc_private))] #![cfg_attr(rustbuild, unstable(feature = "rustc_private", issue = "27812"))] This'll mean that by default they're not using these attributes but when compiled as part of the compiler they do a few things: * Mark themselves as entirely unstable via the `staged_api` feature and the `#![unstable]` attribute. * Allow usage of other unstable crates via `feature(rustc_private)` which is required if the crate relies on any other crates to compile (other than std).
1 parent b04ebef commit 5f10bb5

File tree

30 files changed

+67
-984
lines changed

30 files changed

+67
-984
lines changed
 

‎src/Cargo.lock

Lines changed: 34 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/bootstrap/bin/rustc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ fn main() {
7979
cmd.args(&args)
8080
.arg("--cfg")
8181
.arg(format!("stage{}", stage))
82+
.arg("--cfg").arg("rustbuild")
8283
.env(bootstrap::util::dylib_path_var(),
8384
env::join_paths(&dylib_path).unwrap());
8485

‎src/liblog/Cargo.toml

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.