[commit: ghc] wip/nfs-locking: Compile rts with -O2 (8e3e9bc)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:54:07 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/8e3e9bcf2c7fc37423a5b19ac314fe23447610ad/ghc

>---------------------------------------------------------------

commit 8e3e9bcf2c7fc37423a5b19ac314fe23447610ad
Author: Moritz Angermann <moritz.angermann at gmail.com>
Date:   Tue Jan 5 13:57:35 2016 +0800

    Compile rts with -O2
    
    Fixes #90. We need to force inlining for rts to compile and not end up with missing symbols.


>---------------------------------------------------------------

8e3e9bcf2c7fc37423a5b19ac314fe23447610ad
 src/Settings/Packages/Rts.hs | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/Settings/Packages/Rts.hs b/src/Settings/Packages/Rts.hs
index 36476a0..eb74eea 100644
--- a/src/Settings/Packages/Rts.hs
+++ b/src/Settings/Packages/Rts.hs
@@ -49,6 +49,13 @@ rtsPackageArgs = package rts ? do
           [ arg "-Irts"
           , arg $ "-I" ++ path -/- "build"
           , arg $ "-DRtsWay=\"rts_" ++ show way ++ "\""
+          -- rts **must** be compiled with optimizations. The INLINE_HEADER macro,
+          -- requires that functions are inlined to work as expected.  Inlining
+          -- only happens for optimized builds. Otherwise we can assume that
+          -- there is a non-inlined variant to use instead. But rts does not
+          -- provide non-inlined alternatives and hence needs the function to
+          -- be inlined. See also Issue #90
+          , arg $ "-O2"
 
           , (file "//RtsMessages.*" ||^ file "//Trace.*") ?
             arg ("-DProjectVersion=" ++ quote projectVersion)



More information about the ghc-commits mailing list