Revision 675f65b7
ID | 675f65b75b27c899573b57f390fbeea42bc4ae89 |
Parent | 0d57ce24 |
Child | 55abd2c7 |
Fix profiling targets
As noted by Guido, there are problems when using the hs-prof and
hs-prof-quick targets in the default configuration (compiling all
programs). The errors manifest in the form of wrong symbols during
compilation.
I knew that the hs-prof targets, which compiled multiple objects with
the '.o' suffix, could be problematic; but the objects that are
actually needed in the Template Haskell phase are very standard and
don't differ between the binaries (Constants, BasicTypes, JSON,
THH). What I didn't realise (although it's obvious) is that also the
hs_prof_quick targets (the final binaries) are also compiled with a
single suffix ('.prof_o'), which means that the object files are
actually compiled for the last binary.
This means that targets later in the HS_ALL_PROGS list would work
correct, but early targets, especially htools/htools, would fail.
So the obvious, and the single simple solution is to make these two
rules only work on a single binary at a time. This should be fine,
since one is looking at a specific problem usually, and it has the
advantage that the hs-prof step is much faster (since it wasn't
buildable in parallel anyway).
Thanks to Guido for finding and making the initial diagnose on this!
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
Files
- added
- modified
- copied
- renamed
- deleted