Changes between Version 38 and Version 39 of Commentary/CodingStyle
- Timestamp:
- 07/08/11 19:00:27 (23 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Commentary/CodingStyle
v38 v39 233 233 * ''xxx''`_HOST_OS` 234 234 235 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 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 ([[GhcFile(compiler/utils/Platform.hs)]]). That contains various methods for querying the !DynFlags ([[GhcFile(compiler/main/DynFlags.hs)]]) value for what platform GHC is currently compiling for. 235 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 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 ([[GhcFile(compiler/utils/Platform.hs)]]). That contains various methods for querying the !DynFlags ([[GhcFile(compiler/main/DynFlags.hs)]]) value for what platform GHC is currently compiling for. You should use these when appropriate over the CPP methods.
