bin: Populate context even when not elaborating
@@ -286,7 +286,7 @@ fn score(sess: &Session, matches: &ArgMatches) {
let svlog_sb = svlog::GlobalContext::new(&sess, &svlog_arenas);
// Elaborate the requested entities or modules.
- if let Some(names) = matches.values_of("elaborate") {
+ {
let vhdl_phases = vhdl::lazy::LazyPhaseTable::new(&vhdl_sb);
let ctx = ScoreContext {
sess: sess,
@@ -296,6 +296,7 @@ fn score(sess: &Session, matches: &ArgMatches) {
svlog: &svlog_sb,
};
let lib_id = ctx.add_library(lib, &asts);
+ if let Some(names) = matches.values_of("elaborate") {
debug!("lib_id = {:?}", lib_id);
debug!("{:?}", sb);
for name in names {
@@ -308,6 +309,7 @@ fn score(sess: &Session, matches: &ArgMatches) {
failed = true;
}
}
+ }
if failed || sess.failed() {
std::process::exit(1);
}
