Disentangle DynFlags and SDoc (cf #10143)
Remove several uses of sdocWithDynFlags
.
The solution used here is to store the flags/options related to pretty-printing in the SDocContext (instead of using the DynFlags stored there, for now). See initSDocContext
in DynFlags
which initializes the SDocContext
.
It doesn't fully fix #10143 (closed). The remaining uses of sdocWithDynFlags
are mostly CodeGen related (e.g. depend on target platform constants) and will be fixed separately.