Make Hadrian use -dynamic-too in the basic case
This MR makes Hadrian use -dynamic-too
when the current Flavour's libraryWays contains both vanilla and dynamic, cutting down the amount of repeated work caused by separate compilation of dynamic and static files. This should have a significant impact on Hadrian build times when -dynamic-too
can be used.
Eg. For the quick flavour I get these times:
without -dynamic-too
|
with -dynamic-too
|
---|---|
53m43s | 46m10s |
Unfortunately this commit only works for the most basic case (building .o
and .dyn_o
files with one command), and doesn't generalise to other dynamic/static ways, eg. producing .prof_o
and .prof_dyn_o
files at the same time. It might not be too difficult to generalise it, but it will require more investigation and this basic case already provides significant speedup. Therefore this commit goes a fair amount of the way to fixing #17058 (closed), but doesn't quite get all the way there yet.