[Git][ghc/ghc][wip/backports] Hardcode RTS includes to cope with unregistered builds

Ben Gamari gitlab at gitlab.haskell.org
Sun Aug 9 20:14:25 UTC 2020



Ben Gamari pushed to branch wip/backports at Glasgow Haskell Compiler / GHC


Commits:
9244c555 by Alex Biehl at 2020-08-09T16:14:18-04:00
Hardcode RTS includes to cope with unregistered builds

(cherry picked from commit ef2ae81a394df573510b12b7e11bba0c931249d8)

- - - - -


1 changed file:

- compiler/GHC/Driver/CodeOutput.hs


Changes:

=====================================
compiler/GHC/Driver/CodeOutput.hs
=====================================
@@ -124,27 +124,10 @@ outputC :: DynFlags
 outputC dflags filenm cmm_stream packages
   = do
        withTiming dflags (text "C codegen") (\a -> seq a () {- FIXME -}) $ do
-
-         -- figure out which header files to #include in the generated .hc file:
-         --
-         --   * extra_includes from packages
-         --   * -#include options from the cmdline and OPTIONS pragmas
-         --   * the _stub.h file, if there is one.
-         --
-         let rts = unsafeLookupUnitId (unitState dflags) rtsUnitId
-
-         let cc_injects = unlines (map mk_include (unitIncludes rts))
-             mk_include h_file =
-              case h_file of
-                 '"':_{-"-} -> "#include "++h_file
-                 '<':_      -> "#include "++h_file
-                 _          -> "#include \""++h_file++"\""
-
          let pkg_names = map unitIdString packages
-
          doOutput filenm $ \ h -> do
             hPutStr h ("/* GHC_PACKAGES " ++ unwords pkg_names ++ "\n*/\n")
-            hPutStr h cc_injects
+            hPutStr h "#include \"Stg.h\"\n"
             Stream.consume cmm_stream (writeC dflags h)
 
 {-



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9244c55514d5cb990763fcc79d77e62165c3bcf2

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9244c55514d5cb990763fcc79d77e62165c3bcf2
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/20200809/77be6fd9/attachment-0001.html>


More information about the ghc-commits mailing list