-
This commit makes GHC read `lib/targets/default.target`, a file with a serialized value of `ghc-toolchain`'s `GHC.Toolchain.Target`. Moreover, it removes all the now-redundant entries from `lib/settings` that are configured as part of a `Target` but were being written into `settings`. This makes it easier to support multiple targets from the same compiler (aka runtime retargetability). `ghc-toolchain` can be re-run many times standalone to produce a `Target` description for different targets, and, in the future, GHC will be able to pick at runtime amongst different `Target` files. This commit only makes it read the default `Target` configured in-tree or configured when installing the bindist. The remaining bits of `settings` need to be moved to `Target` in follow up commits, but ultimately they all should be moved since they are per-target relevant. Fixes #24212 On Windows, the constant overhead of parsing a slightly more complex data structure causes some small-allocation tests to wiggle around 1 to 2 extra MB (1-2% in these cases). ------------------------- Metric Increase: MultiLayerModulesTH_OneShot T10421 T10547 T12234 T12425 T13035 T18140 T18923 T9198 TcPlugin_RewritePerf -------------------------This commit makes GHC read `lib/targets/default.target`, a file with a serialized value of `ghc-toolchain`'s `GHC.Toolchain.Target`. Moreover, it removes all the now-redundant entries from `lib/settings` that are configured as part of a `Target` but were being written into `settings`. This makes it easier to support multiple targets from the same compiler (aka runtime retargetability). `ghc-toolchain` can be re-run many times standalone to produce a `Target` description for different targets, and, in the future, GHC will be able to pick at runtime amongst different `Target` files. This commit only makes it read the default `Target` configured in-tree or configured when installing the bindist. The remaining bits of `settings` need to be moved to `Target` in follow up commits, but ultimately they all should be moved since they are per-target relevant. Fixes #24212 On Windows, the constant overhead of parsing a slightly more complex data structure causes some small-allocation tests to wiggle around 1 to 2 extra MB (1-2% in these cases). ------------------------- Metric Increase: MultiLayerModulesTH_OneShot T10421 T10547 T12234 T12425 T13035 T18140 T18923 T9198 TcPlugin_RewritePerf -------------------------
Loading