Skip to content

Commit c984cbd

Browse files
committed
Build the same configuration when compiling and for --print cfg
The configuration returned by `config::build_configuration` needs to be modified with `target_features::add_configuration` in order to also contain the target features. This is already done for the configuration used when compiling and when creating the documentation, but was missing in the `cfg` printing code.
1 parent 01daf90 commit c984cbd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc_driver/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,9 @@ impl RustcDefaultCalls {
565565
}
566566
}
567567
PrintRequest::Cfg => {
568-
for cfg in config::build_configuration(sess) {
568+
let mut cfg = config::build_configuration(&sess);
569+
target_features::add_configuration(&mut cfg, &sess);
570+
for cfg in cfg {
569571
match cfg.node {
570572
ast::MetaItemKind::Word(ref word) => println!("{}", word),
571573
ast::MetaItemKind::NameValue(ref name, ref value) => {

0 commit comments

Comments
 (0)