• Simon Marlow's avatar
    Do not #include external header files when compiling via C · c245355e
    Simon Marlow authored
    This has several advantages:
    
     - -fvia-C is consistent with -fasm with respect to FFI declarations:
       both bind to the ABI, not the API.
    
     - foreign calls can now be inlined freely across module boundaries, since
       a header file is not required when compiling the call.
    
     - bootstrapping via C will be more reliable, because this difference
       in behavour between the two backends has been removed.
    
    There is one disadvantage:
    
     - we get no checking by the C compiler that the FFI declaration
       is correct.
    
    So now, the c-includes field in a .cabal file is always ignored by
    GHC, as are header files specified in an FFI declaration.  This was
    previously the case only for -fasm compilations, now it is also the
    case for -fvia-C too.
    c245355e
RtsTypeable.h 403 Bytes