Skip to content
  • Niklas Hambuechen's avatar
    Makefile.am: Don't use -dynamic-too for .hpc_o files · 403d2bb3
    Niklas Hambuechen authored
    
    
    It turns out that GHC 7.8's -dynamic-too is forbidden not only for
    profiling builds object files, but also for those using HPC coverage.
    
    This commit accordingly renames HFLAGS_NOPROF to HFLAGS_DYNAMIC
    (since it now is not conditional on profiling any more),
    and makes sure that it is not used for profiling or HPC.
    
    This way we achieve that, for profiling+coverage builds
      - .dyn_o files are available for use in TH in the following 3 cases
      - .o files are for the normal binaries
      - .hpc_o files are for coverage-enabled test binaries
      - .prof_o files are for profiling binaries
    
    We make .hpc_o files depend on the .o files because the creation of
    the .o files will also create the .so files needed for TH.
    This was already in place for .prof_o files.
    
    This requires that HFLAGS now also contains `-itest/hs` since
    the rule for .o files is now also responsible for building .o/.so files
    in test/hs.
    
    Signed-off-by: default avatarNiklas Hambuechen <niklash@google.com>
    Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
    
    Cherry-picked-from: 1ad14f38
    
    
    Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
    Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
    403d2bb3