Fix way-specific flags
authorAndrey Mokhov <andrey.mokhov@gmail.com>
Sat, 7 Jan 2017 02:50:41 +0000 (02:50 +0000)
committerAndrey Mokhov <andrey.mokhov@gmail.com>
Sat, 7 Jan 2017 02:50:41 +0000 (02:50 +0000)
src/Settings/Packages/Rts.hs

index e8000c8..6855402 100644 (file)
@@ -61,7 +61,10 @@ rtsPackageArgs = package rts ? do
           -- be inlined. See also #90.
           , arg "-O2"
 
-          , way == threaded ? arg "-DTHREADED_RTS"
+          , Debug     `wayUnit` way          ? arg "-DDEBUG"
+          , way `elem` [debug, debugDynamic] ? arg "-DTICKY_TICKY"
+          , Profiling `wayUnit` way          ? arg "-DPROFILING"
+          , Threaded  `wayUnit` way          ? arg "-DTHREADED_RTS"
 
           , inputs ["//RtsMessages.c", "//Trace.c"] ?
             arg ("-DProjectVersion=" ++ show projectVersion)