bootstrap: enable Cargo public-dependency
feature for libstd
This commit is contained in:
parent
d300bffa4f
commit
64025bb168
4 changed files with 13 additions and 4 deletions
|
@ -1,3 +1,5 @@
|
|||
cargo-features = ["public-dependency"]
|
||||
|
||||
[package]
|
||||
name = "std"
|
||||
version = "0.0.0"
|
||||
|
@ -10,12 +12,12 @@ edition = "2021"
|
|||
crate-type = ["dylib", "rlib"]
|
||||
|
||||
[dependencies]
|
||||
alloc = { path = "../alloc" }
|
||||
alloc = { path = "../alloc", public = true }
|
||||
cfg-if = { version = "1.0", features = ['rustc-dep-of-std'] }
|
||||
panic_unwind = { path = "../panic_unwind", optional = true }
|
||||
panic_abort = { path = "../panic_abort" }
|
||||
core = { path = "../core" }
|
||||
libc = { version = "0.2.143", default-features = false, features = ['rustc-dep-of-std'] }
|
||||
core = { path = "../core", public = true }
|
||||
libc = { version = "0.2.143", default-features = false, features = ['rustc-dep-of-std'], public = true }
|
||||
compiler_builtins = { version = "0.1.92" }
|
||||
profiler_builtins = { path = "../profiler_builtins", optional = true }
|
||||
unwind = { path = "../unwind" }
|
||||
|
@ -25,7 +27,7 @@ std_detect = { path = "../stdarch/crates/std_detect", default-features = false,
|
|||
# Dependencies of the `backtrace` crate
|
||||
addr2line = { version = "0.19.0", optional = true, default-features = false }
|
||||
rustc-demangle = { version = "0.1.21", features = ['rustc-dep-of-std'] }
|
||||
miniz_oxide = { version = "0.6.0", optional = true, default-features = false }
|
||||
miniz_oxide = { version = "0.6.0", optional = true, default-features = false, public = false }
|
||||
[dependencies.object]
|
||||
version = "0.30.0"
|
||||
optional = true
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#![allow(unused)]
|
||||
|
||||
#![allow(exported_private_dependencies)]
|
||||
|
||||
use std::env;
|
||||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
|
|
@ -74,6 +74,7 @@ fn workspace_members(build: &Build) -> impl Iterator<Item = Package> {
|
|||
let collect_metadata = |manifest_path| {
|
||||
let mut cargo = Command::new(&build.initial_cargo);
|
||||
cargo
|
||||
.env("RUSTC_BOOTSTRAP", "1")
|
||||
.arg("metadata")
|
||||
.arg("--format-version")
|
||||
.arg("1")
|
||||
|
|
|
@ -16,6 +16,10 @@ use std::sync::atomic::{AtomicBool, Ordering};
|
|||
use std::thread::{self, scope, ScopedJoinHandle};
|
||||
|
||||
fn main() {
|
||||
// Allow using unstable cargo features in the standard library.
|
||||
// `setenv` might not be thread safe, so run it before using multiple threads.
|
||||
env::set_var("RUSTC_BOOTSTRAP", "1");
|
||||
|
||||
let root_path: PathBuf = env::args_os().nth(1).expect("need path to root of repo").into();
|
||||
let cargo: PathBuf = env::args_os().nth(2).expect("need path to cargo").into();
|
||||
let output_directory: PathBuf =
|
||||
|
|
Loading…
Add table
Reference in a new issue