Changes between Version 38 and Version 39 of Commentary/CodingStyle


Ignore:
Timestamp:
Jul 9, 2011 2:00:27 AM (3 years ago)
Author:
dterei
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/CodingStyle

    v38 v39  
    233233 * ''xxx''`_HOST_OS` 
    234234 
    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. 
     235where ''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.