[Git][ghc/ghc][wip/fendor/ghc-with-debug] 2 commits: Pass cpp options to the CC builder

Hannes Siebenhandl (@fendor) gitlab at gitlab.haskell.org
Tue May 14 10:52:40 UTC 2024



Hannes Siebenhandl pushed to branch wip/fendor/ghc-with-debug at Glasgow Haskell Compiler / GHC


Commits:
2a2a3bce by Fendor at 2024-05-14T12:52:32+02:00
Pass cpp options to the CC builder

- - - - -
5352bc38 by Fendor at 2024-05-14T12:52:32+02:00
Bump ghc-debug submodule

- - - - -


2 changed files:

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


Changes:

=====================================
ghc-debug
=====================================
@@ -1 +1 @@
-Subproject commit fc3ddb42f3e3d3cccedad8902c4b074d5206e6c8
+Subproject commit bd52545effd3967d1ae6c3e0f05306626bda8a06


=====================================
hadrian/src/Settings/Builders/Cc.hs
=====================================
@@ -16,7 +16,12 @@ ccBuilderArgs = do
             , Dynamic `wayUnit` way ? pure [ "-fPIC", "-DDYNAMIC" ]
             , arg "-c", arg =<< getInput
             , arg "-o", arg =<< getOutput ]
-
+        -- Pass 'ghcversion.h' to give sources access to the
+        -- `MIN_VERSION_GLASGOW_HASKELL` macro.
+        , builder (Cc (FindCDependencies CDep)) ? notStage0
+            ? arg "-include" <> arg "rts/include/ghcversion.h"
+        , builder (Cc (FindCDependencies CxxDep)) ? notStage0
+            ? arg "-include" <> arg "rts/include/ghcversion.h"
         , builder (Cc (FindCDependencies CDep)) ? findCDepExpr CDep
         , builder (Cc (FindCDependencies CxxDep)) ? findCDepExpr CxxDep
         ]
@@ -30,5 +35,6 @@ 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
                     , arg =<< getInput
                     ]



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/57396a3aee9be337b8ab4af731feeb410bb47c05...5352bc38cf1658d4066c672399aa609e26cec557

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/57396a3aee9be337b8ab4af731feeb410bb47c05...5352bc38cf1658d4066c672399aa609e26cec557
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/20240514/f5fe96d4/attachment-0001.html>


More information about the ghc-commits mailing list