[Git][ghc/ghc][wip/fendor/hadrian-cc-builder-cpp-options] Pass cpp options to the CC builder in hadrian
Hannes Siebenhandl (@fendor)
gitlab at gitlab.haskell.org
Thu May 16 14:04:21 UTC 2024
Hannes Siebenhandl pushed to branch wip/fendor/hadrian-cc-builder-cpp-options at Glasgow Haskell Compiler / GHC
Commits:
f835ef71 by Fendor at 2024-05-16T14:57:59+02: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/f835ef718de9584e2c5e1958aacdee667dc8ad9a
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f835ef718de9584e2c5e1958aacdee667dc8ad9a
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/20240516/f813b4d0/attachment-0001.html>
More information about the ghc-commits
mailing list