diff options
author | jao <jao@gnu.org> | 2018-12-01 02:51:08 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2018-12-01 02:51:08 +0000 |
commit | 63dd6723703c0fc57cf863a974993c6b66e019bc (patch) | |
tree | b7b678fac7e03251d745be07185b7091d74921de /src | |
parent | a9df65ad952251d2f0c837add0cfe4626d321bf8 (diff) | |
download | xmobar-63dd6723703c0fc57cf863a974993c6b66e019bc.tar.gz xmobar-63dd6723703c0fc57cf863a974993c6b66e019bc.tar.bz2 |
Propagating RTS compilation flags to recompile
Diffstat (limited to 'src')
-rw-r--r-- | src/Xmobar/App/Compile.hs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/Xmobar/App/Compile.hs b/src/Xmobar/App/Compile.hs index 3332c45..6c136dc 100644 --- a/src/Xmobar/App/Compile.hs +++ b/src/Xmobar/App/Compile.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + ------------------------------------------------------------------------------ -- | -- Module: Xmobar.App.Compile @@ -71,9 +73,9 @@ shouldRecompile verb src bin lib = do trace verb "Xmobar doing recompile because some files have changed." return True else do - trace verb "Xmobar skipping recompile because it is not forced \ - \ (e.g. via --recompile), and not any *.hs / *.lhs / *.hsc \ - \ files in lib/ have been changed." + trace verb $ "Xmobar skipping recompile because it is not forced " + ++ "(e.g. via --recompile), and not any *.hs / *.lhs / *.hsc" + ++ "files in lib/ have been changed." return False where isSource = flip elem [".hs",".lhs",".hsc"] . takeExtension allFiles t = do @@ -159,7 +161,14 @@ recompile dir execName force verb = liftIO $ do return (status == ExitSuccess) else return True where opts bin = ["--make" , execName ++ ".hs" , "-i" , "-ilib" - , "-fforce-recomp" , "-main-is", "main" , "-v0" , "-o", bin] + , "-fforce-recomp" , "-main-is", "main" , "-v0"] +#ifdef THREADED_RUNTIME + ++ ["-threaded"] +#endif +#ifdef DRTSOPTS + ++ ["-rtsopts", "-with-rtsopts", "-V0"] +#endif + ++ ["-o", bin] runGHC bin = runProc "ghc" (opts bin) runScript script bin = runProc script [bin] |