diff options
author | Alex Biehl <alex.biehl@target.com> | 2020-07-27 11:33:30 +0200 |
---|---|---|
committer | Alex Biehl <alex.biehl@target.com> | 2020-08-03 07:52:33 +0200 |
commit | ef2ae81a394df573510b12b7e11bba0c931249d8 (patch) | |
tree | 07ccce339cc6ce9a6ac9afd1bc1961ee1aa1502d | |
parent | 947206f478d4eef641dfc58cb4c13471a23260c3 (diff) | |
download | haskell-ef2ae81a394df573510b12b7e11bba0c931249d8.tar.gz |
Hardcode RTS includes to cope with unregistered builds
-rw-r--r-- | compiler/GHC/Driver/CodeOutput.hs | 19 |
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 |