Skip to content
  • John Ericson's avatar
    Remove most uses of TARGET platform macros · 0472f0f6
    John Ericson authored and Marge Bot's avatar Marge Bot committed
    These prevent multi-target builds. They were gotten rid of in 3 ways:
    
    1. In the compiler itself, replacing `#if` with runtime `if`. In these
    cases, we care about the target platform still, but the target platform
    is dynamic so we must delay the elimination to run time.
    
    2. In the compiler itself, replacing `TARGET` with `HOST`. There was
    just one bit of this, in some code splitting strings representing lists
    of paths. These paths are used by GHC itself, and not by the compiled
    binary. (They are compiler lookup paths, rather than RPATHS or something
    that does matter to the compiled binary, and thus would legitamentally
    be target-sensative.) As such, the path-splitting method only depends on
    where GHC runs and not where code it produces runs. This should have
    been `HOST` all along.
    
    3. Changing the RTS. The RTS doesn't care about the target platform,
    full stop.
    
    4. `includes/stg/HaskellMachRegs.h` This file is also included in the
    genapply executable. This is tric...
    0472f0f6