diff options
Diffstat (limited to 'compiler/GHC/Driver/Main.hs')
-rw-r--r-- | compiler/GHC/Driver/Main.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs index 9bfd3704cd..62f7467b11 100644 --- a/compiler/GHC/Driver/Main.hs +++ b/compiler/GHC/Driver/Main.hs @@ -1412,7 +1412,9 @@ hscGenHardCode hsc_env cgguts location output_filename = do let cost_centre_info = (S.toList local_ccs ++ caf_ccs, caf_cc_stacks) - prof_init = profilingInitCode dflags this_mod cost_centre_info + prof_init + | sccProfilingEnabled dflags = profilingInitCode this_mod cost_centre_info + | otherwise = empty foreign_stubs = foreign_stubs0 `appendStubC` prof_init ------------------ Code generation ------------------ |