Skip to content

Move Unit related fields from DynFlags to HscEnv

Sylvain Henry requested to merge hsyl20/ghc:hsyl20/hscenv/unitstate into master

The unit database cache, the home unit and the unit state were stored in DynFlags while they ought to be stored in the compiler session state (HscEnv). This patch fixes this.

It introduces a new UnitEnv type that should be used in the future to handle separate unit environments (especially host vs target units).

Edited by Sylvain Henry

Merge request reports