Skip to content

-DPROFILING not set when compiling C++ files

The revert of 1c18d3b4 in 8ff3134e meant that we no longer pass -DPROFILING to the c++ compiler when compiling profiling objects for c++ files.

The fix is to change opt_cxx to include way flags:

--- a/compiler/GHC/Driver/Session.hs
+++ b/compiler/GHC/Driver/Session.hs
@@ -438,7 +438,8 @@ opt_c                 :: DynFlags -> [String]
 opt_c dflags = concatMap (wayOptc (targetPlatform dflags)) (ways dflags)
             ++ toolSettings_opt_c (toolSettings dflags)
 opt_cxx               :: DynFlags -> [String]
-opt_cxx dflags= toolSettings_opt_cxx $ toolSettings dflags
+opt_cxx dflags= concatMap (wayOptc (targetPlatform dflags)) (ways dflags)
+    ++ toolSettings_opt_cxx (toolSettings dflags)
 opt_a                 :: DynFlags -> [String]
 opt_a dflags= toolSettings_opt_a $ toolSettings dflags
 opt_l                 :: DynFlags -> [String]
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information