Fix bug where Definitions are incorrectly public
Fix a bug where a Definition's root module would be incorrectly marked
public. Definitions currently create a separate Circuit for each
Definition. The logic to control marking the main module public relied on
marking the last module in the circuit public. However, this incorrectly
assumed that there was one Circuit when, in actuality, there are
multiple. (This commit ignores questions of whether or not it should work
this way.)
Instead, use the DyanmicContext `inDefinition` variable to execute this
code path to set the main module public when the Builder is not working
with a Definition.
Fixes #3834.
Signed-off-by:
Schuyler Eldridge <schuyler.eldridge@sifive.com>
parent
3b2c0a3b