Hadrian: profiling and debug enabled ways support -eventlog too
authorAlp Mestanogullari <alpmestan@gmail.com>
Mon, 3 Jun 2019 13:57:02 +0000 (15:57 +0200)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Tue, 4 Jun 2019 18:43:17 +0000 (14:43 -0400)
hadrian/src/Settings/Builders/Ghc.hs

index 0f5ed94..db368f9 100644 (file)
@@ -176,10 +176,12 @@ wayGhcArgs = do
             , (Threaded  `wayUnit` way) ? arg "-optc-DTHREADED_RTS"
             , (Debug     `wayUnit` way) ? arg "-optc-DDEBUG"
             , (Profiling `wayUnit` way) ? arg "-prof"
-            , (Logging   `wayUnit` way) ? arg "-eventlog"
+            , supportsEventlog way ? arg "-eventlog"
             , (way == debug || way == debugDynamic) ?
               pure ["-ticky", "-DTICKY_TICKY"] ]
 
+  where supportsEventlog w = any (`wayUnit` w) [Logging, Profiling, Debug]
+
 packageGhcArgs :: Args
 packageGhcArgs = do
     package <- getPackage