... | ... | @@ -35,4 +35,4 @@ In the compiler's source code, you may make use of the following CPP symbols: |
|
|
where *xxx* is the appropriate value: eg. `i386_TARGET_ARCH`. However **GHC is moving away from using CPP for this purpose** in many cases due to the problems it creates with supporting cross compilation.
|
|
|
|
|
|
|
|
|
So instead of it the new plan is to always build GHC as a cross compiler and select the appropriate values and backend code generator to run and runtime. For this purpose there is the Platform module ([compiler/utils/Platform.hs](/trac/ghc/browser/ghc/compiler/utils/Platform.hs)). That contains various methods for querying the DynFlags ([compiler/main/DynFlags.hs](/trac/ghc/browser/ghc/compiler/main/DynFlags.hs)) value for what platform GHC is currently compiling for. You should use these when appropriate over the CPP methods. |
|
|
So instead of it the new plan is to always build GHC as a cross compiler and select the appropriate values and backend code generator to run and runtime. For this purpose there is the Platform module ([compiler/utils/Platform.hs](/ghc/ghc/tree/master/ghc/compiler/utils/Platform.hs)). That contains various methods for querying the DynFlags ([compiler/main/DynFlags.hs](/trac/ghc/browser/ghc/compiler/main/DynFlags.hs)) value for what platform GHC is currently compiling for. You should use these when appropriate over the CPP methods. |