diff options
| author | bors <bors@rust-lang.org> | 2018-05-06 06:33:53 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-05-06 06:33:53 +0000 |
| commit | 6f721f54c6fb1de9cf00eb9d2d050f818c882871 (patch) | |
| tree | 02bc6af4af448fc5b44fdef10d4f083e74047103 /src/libstd | |
| parent | ce0cb144fbfd361b48a7710d3eb8a576ffda7ef8 (diff) | |
| parent | 05af55bd8052576bc172d635f8eb9207ccedfd29 (diff) | |
Auto merge of #50466 - kennytm:rustbuild-stage0-lib-test, r=Mark-Simulacrum
rustbuild: Allow quick testing of libstd and libcore at stage0 This PR implemented two features: 1. Added a `--no-doc` flag to allow testing a crate *without* doc tests. In this mode, we don't need to build rustdoc, and thus we can skip building the stage2 compiler. (Ideally stage0 test should use the bootstrap rustdoc, but I don't want to mess up the core builder logic here) 2. Moved all libcore tests externally and added a tidy test to ensure we don't accidentally add `#[test]` into libcore. After this PR, one could run `./x.py test --stage 0 --no-doc src/libstd` to test `libstd` without building the compiler, thus enables us to quickly test new library features.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index fc05833e285..d41739ab02c 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -330,10 +330,10 @@ // with a rustc without jemalloc. // FIXME(#44236) shouldn't need MSVC logic #![cfg_attr(all(not(target_env = "msvc"), - any(stage0, feature = "force_alloc_system")), + any(all(stage0, not(test)), feature = "force_alloc_system")), feature(global_allocator))] #[cfg(all(not(target_env = "msvc"), - any(stage0, feature = "force_alloc_system")))] + any(all(stage0, not(test)), feature = "force_alloc_system")))] #[global_allocator] static ALLOC: alloc_system::System = alloc_system::System; |
