summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Biehl <alex.biehl@target.com>2020-07-27 11:33:30 +0200
committerAlex Biehl <alex.biehl@target.com>2020-08-03 07:52:33 +0200
commitef2ae81a394df573510b12b7e11bba0c931249d8 (patch)
tree07ccce339cc6ce9a6ac9afd1bc1961ee1aa1502d
parent947206f478d4eef641dfc58cb4c13471a23260c3 (diff)
downloadhaskell-ef2ae81a394df573510b12b7e11bba0c931249d8.tar.gz
Hardcode RTS includes to cope with unregistered builds
-rw-r--r--compiler/GHC/Driver/CodeOutput.hs19
1 files changed, 1 insertions, 18 deletions
diff --git a/compiler/GHC/Driver/CodeOutput.hs b/compiler/GHC/Driver/CodeOutput.hs
index e4157eee8a..19485eaf5c 100644
--- a/compiler/GHC/Driver/CodeOutput.hs
+++ b/compiler/GHC/Driver/CodeOutput.hs
@@ -125,27 +125,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"
let platform = targetPlatform dflags
writeC = printForC dflags h . cmmToC platform
Stream.consume cmm_stream writeC