Skip to content

Commit

Permalink
Build the same configuration when compiling and for --print cfg
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ranma42 committed Mar 2, 2016
1 parent 01daf90 commit c984cbd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/librustc_driver/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,9 @@ impl RustcDefaultCalls {
}
}
PrintRequest::Cfg => {
for cfg in config::build_configuration(sess) {
let mut cfg = config::build_configuration(&sess);
target_features::add_configuration(&mut cfg, &sess);
for cfg in cfg {
match cfg.node {
ast::MetaItemKind::Word(ref word) => println!("{}", word),
ast::MetaItemKind::NameValue(ref name, ref value) => {
Expand Down

0 comments on commit c984cbd

Please sign in to comment.