Skip to content

Commit 4da9e9f

Browse files
committed
mk: Distribute fewer TARGET_CRATES
Right now everything in TARGET_CRATES is built by default for all non-fulldeps tests and is distributed by default for all target standard library packages. Currenly this includes a number of unstable crates which are rarely used such as `graphviz` and `rbml`> This commit trims down the set of `TARGET_CRATES`, moves a number of tests to `*-fulldeps` as a result, and trims down the dependencies of libtest so we can distribute fewer crates in the `rust-std` packages.
1 parent f25f0e8 commit 4da9e9f

30 files changed

+8
-24
lines changed

mk/crates.mk

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,17 @@
4949
# automatically generated for all stage/host/target combinations.
5050
################################################################################
5151

52-
TARGET_CRATES := libc std flate arena term \
53-
serialize getopts collections test rand \
54-
log graphviz core rbml alloc \
52+
TARGET_CRATES := libc std term \
53+
getopts collections test rand \
54+
core alloc \
5555
rustc_unicode rustc_bitflags \
5656
alloc_system alloc_jemalloc
5757
RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
5858
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
5959
rustc_data_structures rustc_front rustc_platform_intrinsics \
6060
rustc_plugin rustc_metadata rustc_passes
61-
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros
61+
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros \
62+
flate arena graphviz rbml log serialize
6263
TOOLS := compiletest rustdoc rustc rustbook error_index_generator
6364

6465
DEPS_core :=
@@ -84,8 +85,8 @@ DEPS_log := std
8485
DEPS_num := std
8586
DEPS_rbml := std log serialize
8687
DEPS_serialize := std log
87-
DEPS_term := std log
88-
DEPS_test := std getopts serialize rbml term native:rust_test_helpers
88+
DEPS_term := std
89+
DEPS_test := std getopts term native:rust_test_helpers
8990

9091
DEPS_syntax := std term serialize log arena libc rustc_bitflags
9192
DEPS_syntax_ext := syntax fmt_macros

src/libgetopts/lib.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,6 @@
9292
#![deny(missing_docs)]
9393
#![feature(staged_api)]
9494
#![feature(str_char)]
95-
#![cfg_attr(test, feature(rustc_private))]
96-
97-
#[cfg(test)]
98-
#[macro_use]
99-
extern crate log;
10095

10196
use self::Name::*;
10297
use self::HasArg::*;
@@ -1544,8 +1539,6 @@ Options:
15441539

15451540
let generated_usage = usage("Usage: fruits", &optgroups);
15461541

1547-
debug!("expected: <<{}>>", expected);
1548-
debug!("generated: <<{}>>", generated_usage);
15491542
assert_eq!(generated_usage, expected);
15501543
}
15511544

@@ -1573,8 +1566,6 @@ Options:
15731566

15741567
let usage = usage("Usage: fruits", &optgroups);
15751568

1576-
debug!("expected: <<{}>>", expected);
1577-
debug!("generated: <<{}>>", usage);
15781569
assert!(usage == expected)
15791570
}
15801571

@@ -1601,8 +1592,6 @@ Options:
16011592

16021593
let usage = usage("Usage: fruits", &optgroups);
16031594

1604-
debug!("expected: <<{}>>", expected);
1605-
debug!("generated: <<{}>>", usage);
16061595
assert!(usage == expected)
16071596
}
16081597

@@ -1617,8 +1606,6 @@ Options:
16171606
let expected = "Usage: fruits -b VAL [-a VAL] [-k] [-p [VAL]] [-l VAL]..".to_string();
16181607
let generated_usage = short_usage("fruits", &optgroups);
16191608

1620-
debug!("expected: <<{}>>", expected);
1621-
debug!("generated: <<{}>>", generated_usage);
16221609
assert_eq!(generated_usage, expected);
16231610
}
16241611

src/libtest/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ crate-type = ["dylib", "rlib"]
1111
[dependencies]
1212
getopts = { path = "../libgetopts" }
1313
term = { path = "../libterm" }
14-
serialize = { path = "../libserialize" }

src/libtest/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
#![feature(staged_api)]
4343

4444
extern crate getopts;
45-
extern crate serialize;
46-
extern crate serialize as rustc_serialize;
4745
extern crate term;
4846
extern crate libc;
4947

@@ -56,7 +54,6 @@ use self::NamePadding::*;
5654
use self::OutputLocation::*;
5755

5856
use stats::Stats;
59-
use serialize::Encodable;
6057
use std::boxed::FnBox;
6158
use term::Terminal;
6259

@@ -215,7 +212,7 @@ pub struct TestDescAndFn {
215212
pub testfn: TestFn,
216213
}
217214

218-
#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Debug, Copy)]
215+
#[derive(Clone, PartialEq, Debug, Copy)]
219216
pub struct Metric {
220217
value: f64,
221218
noise: f64,

0 commit comments

Comments
 (0)