From 9556cf453f6c1499a2907acd72d7b11211387b0d Mon Sep 17 00:00:00 2001 From: hallgren Date: Fri, 11 Sep 2015 14:18:01 +0000 Subject: Parallel compilation: "gf -make -j" and "gf -make -j=n" now work as expected * "gf -make -j=n" uses n parallel threads. * "gf -make -j" adapts to the number of processors in the system. This mimics how "cabal build -j" and "ghc --make -j" works. Support for this is implemented in the new module GF.System.Concurrency and it depends on the function Control.Concurrent.setNumCapabilities, which is only available in GHC>=7.6 (base>=4.6). GF can still be compiled with GHC<7.6, but then you have to use +RTS -N -RTS to take advantage of multicore processors. To detect the number of processors in the system, the code depends on a foreign import of a C function in the GHC run-time system. --- gf.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gf.cabal') diff --git a/gf.cabal b/gf.cabal index 9b427afa6..bbdf7d090 100644 --- a/gf.cabal +++ b/gf.cabal @@ -254,11 +254,11 @@ Library GF.Speech.SRGS_XML GF.Speech.VoiceXML GF.System.Catch + GF.System.Concurrency GF.System.Console GF.System.Directory GF.System.Process GF.System.Signal --- GF.System.UseSignal GF.Text.Clitics GF.Text.Coding GF.Text.Lexing -- cgit v1.2.3