diff options
| author | bors <bors@rust-lang.org> | 2017-02-24 02:40:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-02-24 02:40:16 +0000 |
| commit | 674af8c7f593bf69fd2f5edbd718d4b6100656ef (patch) | |
| tree | ce7dc85a176532110386593d98a33235b92b6528 /src/bootstrap | |
| parent | 413a975e31584d1e22d158a70c6d3073b991a618 (diff) | |
| parent | 40aaa65734d72b7aabda3cd0925b0119fb6d5a0a (diff) | |
| download | rust-674af8c7f593bf69fd2f5edbd718d4b6100656ef.tar.gz rust-674af8c7f593bf69fd2f5edbd718d4b6100656ef.zip | |
Auto merge of #39851 - alexcrichton:verify-unstable, r=brson
test: Verify all sysroot crates are unstable As we continue to add more crates to the compiler and use them to implement various features we want to be sure we're not accidentally expanding the API surface area of the compiler! To that end this commit adds a new `run-make` test which will attempt to `extern crate foo` all crates in the sysroot, verifying that they're all unstable. This commit discovered that the `std_shim` and `test_shim` crates were accidentally stable and fixes the situation by deleting those shims. The shims are no longer necessary due to changes in Cargo that have happened since they were originally incepted.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/README.md | 4 | ||||
| -rw-r--r-- | src/bootstrap/check.rs | 4 | ||||
| -rw-r--r-- | src/bootstrap/compile.rs | 4 | ||||
| -rw-r--r-- | src/bootstrap/doc.rs | 4 | ||||
| -rw-r--r-- | src/bootstrap/metadata.rs | 4 | ||||
| -rw-r--r-- | src/bootstrap/step.rs | 50 |
6 files changed, 35 insertions, 35 deletions
diff --git a/src/bootstrap/README.md b/src/bootstrap/README.md index ac84edb4038..2f7757fb1d5 100644 --- a/src/bootstrap/README.md +++ b/src/bootstrap/README.md @@ -267,8 +267,8 @@ build/ The current build is unfortunately not quite as simple as `cargo build` in a directory, but rather the compiler is split into three different Cargo projects: -* `src/rustc/std_shim` - a project which builds and compiles libstd -* `src/rustc/test_shim` - a project which builds and compiles libtest +* `src/libstd` - the standard library +* `src/libtest` - testing support, depends on libstd * `src/rustc` - the actual compiler itself Each "project" has a corresponding Cargo.lock file with all dependencies, and diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index 00758460bec..dfe96b51799 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -346,10 +346,10 @@ pub fn krate(build: &Build, krate: Option<&str>) { let (name, path, features, root) = match mode { Mode::Libstd => { - ("libstd", "src/rustc/std_shim", build.std_features(), "std_shim") + ("libstd", "src/libstd", build.std_features(), "std") } Mode::Libtest => { - ("libtest", "src/rustc/test_shim", String::new(), "test_shim") + ("libtest", "src/libtest", String::new(), "test") } Mode::Librustc => { ("librustc", "src/rustc", build.rustc_features(), "rustc-main") diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 0b1a1f39d8d..00904bc776a 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -64,7 +64,7 @@ pub fn std(build: &Build, target: &str, compiler: &Compiler) { } cargo.arg("--features").arg(features) .arg("--manifest-path") - .arg(build.src.join("src/rustc/std_shim/Cargo.toml")); + .arg(build.src.join("src/libstd/Cargo.toml")); if let Some(target) = build.config.target_config.get(target) { if let Some(ref jemalloc) = target.jemalloc { @@ -162,7 +162,7 @@ pub fn test(build: &Build, target: &str, compiler: &Compiler) { build.clear_if_dirty(&out_dir, &libstd_stamp(build, compiler, target)); let mut cargo = build.cargo(compiler, Mode::Libtest, target, "build"); cargo.arg("--manifest-path") - .arg(build.src.join("src/rustc/test_shim/Cargo.toml")); + .arg(build.src.join("src/libtest/Cargo.toml")); build.run(&mut cargo); update_mtime(build, &libtest_stamp(build, compiler, target)); } diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs index f4a66714166..5fd6570e161 100644 --- a/src/bootstrap/doc.rs +++ b/src/bootstrap/doc.rs @@ -148,7 +148,7 @@ pub fn std(build: &Build, stage: u32, target: &str) { let mut cargo = build.cargo(&compiler, Mode::Libstd, target, "doc"); cargo.arg("--manifest-path") - .arg(build.src.join("src/rustc/std_shim/Cargo.toml")) + .arg(build.src.join("src/libstd/Cargo.toml")) .arg("--features").arg(build.std_features()); // We don't want to build docs for internal std dependencies unless @@ -194,7 +194,7 @@ pub fn test(build: &Build, stage: u32, target: &str) { let mut cargo = build.cargo(&compiler, Mode::Libtest, target, "doc"); cargo.arg("--manifest-path") - .arg(build.src.join("src/rustc/test_shim/Cargo.toml")); + .arg(build.src.join("src/libtest/Cargo.toml")); build.run(&mut cargo); cp_r(&out_dir, &out) } diff --git a/src/bootstrap/metadata.rs b/src/bootstrap/metadata.rs index 8befb105ff6..5ab542b6a24 100644 --- a/src/bootstrap/metadata.rs +++ b/src/bootstrap/metadata.rs @@ -43,8 +43,8 @@ struct ResolveNode { } pub fn build(build: &mut Build) { - build_krate(build, "src/rustc/std_shim"); - build_krate(build, "src/rustc/test_shim"); + build_krate(build, "src/libstd"); + build_krate(build, "src/libtest"); build_krate(build, "src/rustc"); } diff --git a/src/bootstrap/step.rs b/src/bootstrap/step.rs index fe183c5bce8..dcd3407e174 100644 --- a/src/bootstrap/step.rs +++ b/src/bootstrap/step.rs @@ -246,14 +246,14 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules { crate_rule(build, &mut rules, "libstd-link", - "build-crate-std_shim", + "build-crate-std", compile::std_link) .dep(|s| s.name("startup-objects")) .dep(|s| s.name("create-sysroot").target(s.host)); crate_rule(build, &mut rules, "libtest-link", - "build-crate-test_shim", + "build-crate-test", compile::test_link) .dep(|s| s.name("libstd-link")); crate_rule(build, @@ -263,13 +263,13 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules { compile::rustc_link) .dep(|s| s.name("libtest-link")); - for (krate, path, _default) in krates("std_shim") { + for (krate, path, _default) in krates("std") { rules.build(&krate.build_step, path) .dep(|s| s.name("startup-objects")) .dep(move |s| s.name("rustc").host(&build.config.build).target(s.host)) .run(move |s| compile::std(build, s.target, &s.compiler())); } - for (krate, path, _default) in krates("test_shim") { + for (krate, path, _default) in krates("test") { rules.build(&krate.build_step, path) .dep(|s| s.name("libstd-link")) .run(move |s| compile::test(build, s.target, &s.compiler())); @@ -384,7 +384,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules { "pretty", "run-fail-fulldeps"); } - for (krate, path, _default) in krates("std_shim") { + for (krate, path, _default) in krates("std") { rules.test(&krate.test_step, path) .dep(|s| s.name("libtest")) .dep(|s| s.name("emulator-copy-libs")) @@ -400,7 +400,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules { Mode::Libstd, TestKind::Test, None)); // std benchmarks - for (krate, path, _default) in krates("std_shim") { + for (krate, path, _default) in krates("std") { rules.bench(&krate.bench_step, path) .dep(|s| s.name("libtest")) .dep(|s| s.name("emulator-copy-libs")) @@ -415,7 +415,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules { .run(move |s| check::krate(build, &s.compiler(), s.target, Mode::Libstd, TestKind::Bench, None)); - for (krate, path, _default) in krates("test_shim") { + for (krate, path, _default) in krates("test") { rules.test(&krate.test_step, path) .dep(|s| s.name("libtest")) .dep(|s| s.name("emulator-copy-libs")) @@ -601,13 +601,13 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules { .default(build.config.docs) .host(true) .run(move |s| doc::error_index(build, s.target)); - for (krate, path, default) in krates("std_shim") { + for (krate, path, default) in krates("std") { rules.doc(&krate.doc_step, path) .dep(|s| s.name("libstd-link")) .default(default && build.config.docs) .run(move |s| doc::std(build, s.stage, s.target)); } - for (krate, path, default) in krates("test_shim") { + for (krate, path, default) in krates("test") { rules.doc(&krate.doc_step, path) .dep(|s| s.name("libtest-link")) .default(default && build.config.compiler_docs) @@ -1172,23 +1172,23 @@ mod tests { let mut build = Build::new(flags, config); let cwd = env::current_dir().unwrap(); - build.crates.insert("std_shim".to_string(), ::Crate { - name: "std_shim".to_string(), + build.crates.insert("std".to_string(), ::Crate { + name: "std".to_string(), deps: Vec::new(), - path: cwd.join("src/std_shim"), - doc_step: "doc-std_shim".to_string(), - build_step: "build-crate-std_shim".to_string(), - test_step: "test-std_shim".to_string(), - bench_step: "bench-std_shim".to_string(), + path: cwd.join("src/std"), + doc_step: "doc-std".to_string(), + build_step: "build-crate-std".to_string(), + test_step: "test-std".to_string(), + bench_step: "bench-std".to_string(), }); - build.crates.insert("test_shim".to_string(), ::Crate { - name: "test_shim".to_string(), + build.crates.insert("test".to_string(), ::Crate { + name: "test".to_string(), deps: Vec::new(), - path: cwd.join("src/test_shim"), - doc_step: "doc-test_shim".to_string(), - build_step: "build-crate-test_shim".to_string(), - test_step: "test-test_shim".to_string(), - bench_step: "bench-test_shim".to_string(), + path: cwd.join("src/test"), + doc_step: "doc-test".to_string(), + build_step: "build-crate-test".to_string(), + test_step: "test-test".to_string(), + bench_step: "bench-test".to_string(), }); build.crates.insert("rustc-main".to_string(), ::Crate { name: "rustc-main".to_string(), @@ -1378,7 +1378,7 @@ mod tests { let all = rules.expand(&plan); println!("all rules: {:#?}", all); assert!(!all.contains(&step.name("rustc"))); - assert!(!all.contains(&step.name("build-crate-std_shim").stage(1))); + assert!(!all.contains(&step.name("build-crate-std").stage(1))); // all stage0 compiles should be for the build target, A for step in all.iter().filter(|s| s.stage == 0) { @@ -1443,7 +1443,7 @@ mod tests { assert!(!plan.iter().any(|s| s.name.contains("rustc"))); assert!(plan.iter().all(|s| { - !s.name.contains("test_shim") || s.target == "C" + !s.name.contains("test") || s.target == "C" })); } |
