mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-20 02:43:45 +00:00
syntax: Pass the correct crate_cfg to the syntax expander
This commit is contained in:
parent
e14a0eec23
commit
1b5efaac27
@ -173,7 +173,7 @@ fn compile_upto(sess: session, cfg: ast::crate_cfg,
|
||||
front::test::modify_for_testing(sess, crate));
|
||||
|
||||
crate = time(time_passes, ~"expansion", ||
|
||||
syntax::ext::expand::expand_crate(sess.parse_sess, sess.opts.cfg,
|
||||
syntax::ext::expand::expand_crate(sess.parse_sess, cfg,
|
||||
crate));
|
||||
|
||||
if upto == cu_expand { return {crate: crate, tcx: None}; }
|
||||
|
@ -144,6 +144,10 @@ type options =
|
||||
addl_lib_search_paths: ~[Path],
|
||||
maybe_sysroot: Option<Path>,
|
||||
target_triple: ~str,
|
||||
// User-specified cfg meta items. The compiler itself will add additional
|
||||
// items to the crate config, and during parsing the entire crate config
|
||||
// will be added to the crate AST node. This should not be used for
|
||||
// anything except building the full crate config prior to parsing.
|
||||
cfg: ast::crate_cfg,
|
||||
binary: ~str,
|
||||
test: bool,
|
||||
|
Loading…
Reference in New Issue
Block a user