Ghc lib 8.8.0.20190723 (#2279)

* Upgrade ghc-lib

* Patch bazel_tools : hazel-include-paths patch, no-isystem patch.

* Provide "haskell_c2hs" for package name to cabal_haskell_package

* Package name haskell_c2hs => c2hs.

* Switch to less hacky patch for include dirs
This commit is contained in:
Shayne Fletcher 2019-07-25 04:59:34 -04:00 committed by Gary Verhaegen
parent 26986fed0e
commit e41f17c969

View File

@ -24,6 +24,9 @@ import Module
import DynFlags
import Panic
import FileCleanup
#ifndef GHC_STABLE
import LlvmCodeGen (LlvmVersion (..))
#endif
import System.Directory
import System.FilePath
@ -130,7 +133,12 @@ getBackendDefs :: DynFlags -> IO [String]
getBackendDefs dflags | hscTarget dflags == HscLlvm = do
llvmVer <- figureLlvmVersion dflags
return $ case llvmVer of
#ifdef GHC_STABLE
Just n -> [ "-D__GLASGOW_HASKELL_LLVM__=" ++ format n ]
#else
Just (LlvmVersion n) -> [ "-D__GLASGOW_HASKELL_LLVM__=" ++ format (n,0) ]
Just (LlvmVersionOld m n) -> [ "-D__GLASGOW_HASKELL_LLVM__=" ++ format (m,n) ]
#endif
_ -> []
where
format (major, minor)