Adds `smp` flag to rts.cabal.
authorMoritz Angermann <moritz.angermann@gmail.com>
Sat, 25 Nov 2017 12:49:56 +0000 (20:49 +0800)
committerMoritz Angermann <moritz.angermann@gmail.com>
Mon, 5 Feb 2018 01:51:22 +0000 (09:51 +0800)
rts/rts.cabal.in

index 71aef3d..b33a5f4 100644 (file)
@@ -24,6 +24,8 @@ flag 64bit
   default: @Cabal64bit@
 flag leading-underscore
   default: @CabalLeadingUnderscore@
+flag smp
+  default: True
 
 library
     -- rts is a wired in package and
@@ -72,6 +74,8 @@ library
     if flag(libdw)
        -- for backtraces
        extra-libraries: elf dw
+    if !flag(smp)
+       cpp-options: -DNOSMP
 
     include-dirs: build ../includes includes
                   includes/dist-derivedconstants/header @FFIIncludeDir@