diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-09-20 16:41:39 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-09-20 16:41:53 -0700 |
| commit | 1b5efaac27408d958a0013c040ce269ccb5c142c (patch) | |
| tree | 6018d021872213bf7adffbcbf74a5a6007b3c111 | |
| parent | e14a0eec23b49f51a32ea254f2749f2f08386f5b (diff) | |
| download | rust-1b5efaac27408d958a0013c040ce269ccb5c142c.tar.gz rust-1b5efaac27408d958a0013c040ce269ccb5c142c.zip | |
syntax: Pass the correct crate_cfg to the syntax expander
| -rw-r--r-- | src/rustc/driver/driver.rs | 2 | ||||
| -rw-r--r-- | src/rustc/driver/session.rs | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/rustc/driver/driver.rs b/src/rustc/driver/driver.rs index 93ab61e245a..ebdc8bc848c 100644 --- a/src/rustc/driver/driver.rs +++ b/src/rustc/driver/driver.rs @@ -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}; } diff --git a/src/rustc/driver/session.rs b/src/rustc/driver/session.rs index 01dcd6930b3..8c085e6391d 100644 --- a/src/rustc/driver/session.rs +++ b/src/rustc/driver/session.rs @@ -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, |
