[Git][ghc/ghc][master] Pass cpp options to the CC builder in hadrian

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Sat May 18 04:27:52 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
0e679e37 by Fendor at 2024-05-18T00:27:24-04:00
Pass cpp options to the CC builder in hadrian

- - - - -


1 changed file:

- hadrian/src/Settings/Builders/Cc.hs


Changes:

=====================================
hadrian/src/Settings/Builders/Cc.hs
=====================================
@@ -16,7 +16,6 @@ ccBuilderArgs = do
             , Dynamic `wayUnit` way ? pure [ "-fPIC", "-DDYNAMIC" ]
             , arg "-c", arg =<< getInput
             , arg "-o", arg =<< getOutput ]
-
         , builder (Cc (FindCDependencies CDep)) ? findCDepExpr CDep
         , builder (Cc (FindCDependencies CxxDep)) ? findCDepExpr CxxDep
         ]
@@ -30,5 +29,9 @@ ccBuilderArgs = do
                     , case depType of CDep -> mempty; CxxDep -> arg "-std=c++11"
                     , cIncludeArgs
                     , arg "-x", arg (case depType of CDep -> "c"; CxxDep -> "c++")
+                    , case depType of CDep -> mempty; CxxDep -> getContextData cxxOpts
+                    -- Pass 'ghcversion.h' to give sources access to the
+                    -- `MIN_VERSION_GLASGOW_HASKELL` macro.
+                    , notStage0 ? arg "-include" <> arg "rts/include/ghcversion.h"
                     , arg =<< getInput
                     ]



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0e679e372c2d33906fc94409c2f8db5266cbc5f8

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0e679e372c2d33906fc94409c2f8db5266cbc5f8
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240518/c89563a0/attachment-0001.html>


More information about the ghc-commits mailing list