Implement `MIN_VERSION_GLASGOW_HASKELL()` macro
This exposes the `cProjectPatchLevel{1,2}` value at the CPP level to allow it to be used in CPP conditionals. Concretely, GHC 7.10.2.20150623 would result in #define __GLASGOW_HASKELL__ 710 #define __GLASGOW_HASKELL_PATCHLEVEL1__ 2 #define __GLASGOW_HASKELL_PATCHLEVEL2__ 20150623 while GHC 7.10.3 results in #define __GLASGOW_HASKELL__ 710 #define __GLASGOW_HASKELL_PATCHLEVEL1__ 3 and finally GHC 7.9.20141009 results in #define __GLASGOW_HASKELL__ 709 #define __GLASGOW_HASKELL_PATCHLEVEL1__ 20141009 As it's error-prone to properly express CPP conditionals for testing GHC multi-component versions, a new macro `MIN_VERSION_GLASGOW_HASKELL()` is provided (also via the new CPP include file `ghcversion.h`) Finally, in order to make it easier to define the new CPP macro `MIN_VERSION_GLASGOW_HASKELL()`, a new default-included `include/ghcversion.h` is used for the new CPP definitions. Reviewed By: ekmett, austin, #ghc Differential Revision: https://phabricator.haskell.org/D66
Showing
- .gitignore 1 addition, 0 deletions.gitignore
- aclocal.m4 7 additions, 0 deletionsaclocal.m4
- compiler/ghc.mk 4 additions, 0 deletionscompiler/ghc.mk
- compiler/main/DriverPipeline.hs 22 additions, 6 deletionscompiler/main/DriverPipeline.hs
- docs/users_guide/phases.xml 79 additions, 0 deletionsdocs/users_guide/phases.xml
- ghc.mk 1 addition, 0 deletionsghc.mk
- includes/ghc.mk 34 additions, 5 deletionsincludes/ghc.mk
- mk/project.mk.in 2 additions, 0 deletionsmk/project.mk.in
Loading
Please register or sign in to comment