Platform
Description
A description of the platform we're compiling for. In the future, this module should be the only one that references the evil #defines for each TARGET_ARCH and TARGET_OS
- data Platform = Platform {
- platformArch :: Arch
- platformOS :: OS
- data Arch
- = ArchUnknown
- | ArchX86
- | ArchX86_64
- | ArchPPC
- | ArchPPC_64
- | ArchSPARC
- | ArchARM
- data OS
- defaultTargetPlatform :: Platform
- target32Bit :: Platform -> Bool
- osElfTarget :: OS -> Bool
Documentation
Contains enough information for the native code generator to emit code for this platform.
Constructors
Platform | |
Fields
|
Architectures that the native code generator knows about. TODO: It might be nice to extend these constructors with information about what instruction set extensions an architecture might support.
Constructors
ArchUnknown | |
ArchX86 | |
ArchX86_64 | |
ArchPPC | |
ArchPPC_64 | |
ArchSPARC | |
ArchARM |
Operating systems that the native code generator knows about. Having OSUnknown should produce a sensible default, but no promises.
defaultTargetPlatform :: PlatformSource
This is the target platform as far as the #ifdefs are concerned. These are set in includes/ghcplatform.h by the autoconf scripts
target32Bit :: Platform -> BoolSource
osElfTarget :: OS -> BoolSource
This predicates tells us whether the OS supports ELF-like shared libraries.