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>
Thu, 15 Feb 2018 01:51:11 +0000 (09:51 +0800)
Reviewers: bgamari, erikd, simonmar

Reviewed By: simonmar

Subscribers: rwbarton, thomie, carter

Differential Revision: https://phabricator.haskell.org/D4393

rts/rts.cabal.in

index 53b6271..ce9d751 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@