Rodrigo Mesquita pushed to branch wip/romes/T26166 at Glasgow Haskell Compiler / GHC

Commits:

23 changed files:

Changes:

  • libraries/ghc-internal/include/RtsIfaceStub.h
    1
    +#pragma once
    
    2
    +
    
    1 3
     #include <stdio.h>
    
    2 4
     void __attribute__((weak)) init_ghc_hs_iface(void) {
    
    3 5
         fprintf(stderr, "init_ghc_hs_iface: weak constructor stub for init_ghc_hs_iface was not overriden by the actual constructor. Obviously wrong! This stub should never make it into the final object except for in the Cabal checkForeignDeps configuration checks!");
    

  • libraries/ghc-internal/include/RtsIfaceSymbols.h
    ... ... @@ -65,3 +65,4 @@ UNDEF_CLOSURE(GHCziInternalziWasmziPrimziImports, raiseJSException_closure)
    65 65
     UNDEF_CLOSURE(GHCziInternalziWasmziPrim, JSVal_con_info)
    
    66 66
     UNDEF_CLOSURE(GHCziInternalziWasmziPrim, threadDelay_closure)
    
    67 67
     #endif
    
    68
    +

  • libraries/ghc-internal/src/GHC/Internal/Clock.hsc
    ... ... @@ -15,6 +15,8 @@ import GHC.Internal.Float () -- for Num Double instance
    15 15
     import GHC.Internal.Num
    
    16 16
     #endif
    
    17 17
     
    
    18
    +#include "RtsIfaceStub.h"
    
    19
    +
    
    18 20
     -- | Return monotonic time in seconds, since some unspecified starting point
    
    19 21
     --
    
    20 22
     -- @since base-4.11.0.0
    

  • libraries/ghc-internal/src/GHC/Internal/ConsoleHandler.hsc
    ... ... @@ -19,6 +19,7 @@
    19 19
     -----------------------------------------------------------------------------
    
    20 20
     
    
    21 21
     module GHC.Internal.ConsoleHandler
    
    22
    +#include "RtsIfaceStub.h"
    
    22 23
     #if !defined(mingw32_HOST_OS)
    
    23 24
             where
    
    24 25
     
    

  • libraries/ghc-internal/src/GHC/Internal/Event/EPoll.hsc
    ... ... @@ -24,6 +24,7 @@ module GHC.Internal.Event.EPoll
    24 24
     import qualified GHC.Internal.Event.Internal as E
    
    25 25
     
    
    26 26
     #include "EventConfig.h"
    
    27
    +#include "RtsIfaceStub.h"
    
    27 28
     #if !defined(HAVE_EPOLL)
    
    28 29
     import GHC.Internal.Base
    
    29 30
     
    

  • libraries/ghc-internal/src/GHC/Internal/Event/KQueue.hsc
    ... ... @@ -16,6 +16,7 @@ module GHC.Internal.Event.KQueue
    16 16
     import qualified GHC.Internal.Event.Internal as E
    
    17 17
     
    
    18 18
     #include "EventConfig.h"
    
    19
    +#include "RtsIfaceStub.h"
    
    19 20
     #if !defined(HAVE_KQUEUE)
    
    20 21
     import GHC.Internal.Base
    
    21 22
     
    

  • libraries/ghc-internal/src/GHC/Internal/Event/Poll.hsc
    ... ... @@ -11,6 +11,7 @@ module GHC.Internal.Event.Poll
    11 11
         ) where
    
    12 12
     
    
    13 13
     #include "EventConfig.h"
    
    14
    +#include "RtsIfaceStub.h"
    
    14 15
     
    
    15 16
     #if !defined(HAVE_POLL_H)
    
    16 17
     import GHC.Internal.Base
    

  • libraries/ghc-internal/src/GHC/Internal/ExecutionStack/Internal.hsc
    ... ... @@ -21,6 +21,7 @@
    21 21
     #include "HsFFI.h"
    
    22 22
     #include "HsBaseConfig.h"
    
    23 23
     #include "rts/Libdw.h"
    
    24
    +#include "RtsIfaceStub.h"
    
    24 25
     
    
    25 26
     {-# LANGUAGE MultiWayIf #-}
    
    26 27
     
    

  • libraries/ghc-internal/src/GHC/Internal/Heap/Constants.hsc
    ... ... @@ -7,6 +7,7 @@ module GHC.Internal.Heap.Constants
    7 7
         ) where
    
    8 8
     
    
    9 9
     #include "MachDeps.h"
    
    10
    +#include "RtsIfaceStub.h"
    
    10 11
     
    
    11 12
     import GHC.Internal.Data.Bits
    
    12 13
     import GHC.Internal.Int
    

  • libraries/ghc-internal/src/GHC/Internal/Heap/InfoTable.hsc
    ... ... @@ -6,6 +6,7 @@ module GHC.Internal.Heap.InfoTable
    6 6
         ) where
    
    7 7
     
    
    8 8
     #include "Rts.h"
    
    9
    +#include "RtsIfaceStub.h"
    
    9 10
     
    
    10 11
     import GHC.Internal.Base
    
    11 12
     import GHC.Internal.Real
    

  • libraries/ghc-internal/src/GHC/Internal/Heap/InfoTable/Types.hsc
    ... ... @@ -10,6 +10,7 @@ module GHC.Internal.Heap.InfoTable.Types
    10 10
         ) where
    
    11 11
     
    
    12 12
     #include "Rts.h"
    
    13
    +#include "RtsIfaceStub.h"
    
    13 14
     
    
    14 15
     import GHC.Internal.Base
    
    15 16
     import GHC.Internal.Generics
    

  • libraries/ghc-internal/src/GHC/Internal/Heap/InfoTableProf.hsc
    ... ... @@ -10,6 +10,7 @@ module GHC.Internal.Heap.InfoTableProf
    10 10
     -- representation of StgInfoTable_ when hsc2hs runs.
    
    11 11
     #define PROFILING
    
    12 12
     #include "Rts.h"
    
    13
    +#include "RtsIfaceStub.h"
    
    13 14
     
    
    14 15
     import GHC.Internal.Base
    
    15 16
     import GHC.Internal.Real
    

  • libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock/Flock.hsc
    ... ... @@ -8,6 +8,7 @@
    8 8
     module GHC.Internal.IO.Handle.Lock.Flock where
    
    9 9
     
    
    10 10
     #include "HsBaseConfig.h"
    
    11
    +#include "RtsIfaceStub.h"
    
    11 12
     
    
    12 13
     #if !HAVE_FLOCK
    
    13 14
     -- See W1 of Note [Tracking dependencies on primitives] in GHC.Internal.Base
    

  • libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock/LinuxOFD.hsc
    ... ... @@ -8,6 +8,7 @@
    8 8
     module GHC.Internal.IO.Handle.Lock.LinuxOFD where
    
    9 9
     
    
    10 10
     #include "HsBaseConfig.h"
    
    11
    +#include "RtsIfaceStub.h"
    
    11 12
     
    
    12 13
     #if !HAVE_OFD_LOCKING
    
    13 14
     -- See W1 of Note [Tracking dependencies on primitives] in GHC.Internal.Base
    

  • libraries/ghc-internal/src/GHC/Internal/IO/Handle/Lock/Windows.hsc
    ... ... @@ -8,6 +8,7 @@
    8 8
     module GHC.Internal.IO.Handle.Lock.Windows where
    
    9 9
     
    
    10 10
     #include "HsBaseConfig.h"
    
    11
    +#include "RtsIfaceStub.h"
    
    11 12
     
    
    12 13
     #if !defined(mingw32_HOST_OS)
    
    13 14
     -- See W1 of Note [Tracking dependencies on primitives] in GHC.Internal.Base
    

  • libraries/ghc-internal/src/GHC/Internal/InfoProv/Types.hsc
    ... ... @@ -5,6 +5,7 @@
    5 5
     {-# LANGUAGE NoImplicitPrelude #-}
    
    6 6
     
    
    7 7
     #include "Rts.h"
    
    8
    +#include "RtsIfaceStub.h"
    
    8 9
     
    
    9 10
     module GHC.Internal.InfoProv.Types
    
    10 11
         ( InfoProv(..)
    

  • libraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc
    ... ... @@ -52,6 +52,7 @@ module GHC.Internal.RTS.Flags
    52 52
       ) where
    
    53 53
     
    
    54 54
     #include "Rts.h"
    
    55
    +#include "RtsIfaceStub.h"
    
    55 56
     #include "rts/Flags.h"
    
    56 57
     
    
    57 58
     import GHC.Internal.Data.Functor ((<$>))
    

  • libraries/ghc-internal/src/GHC/Internal/RTS/Flags/Test.hsc
    ... ... @@ -7,6 +7,8 @@ module GHC.Internal.RTS.Flags.Test
    7 7
       )
    
    8 8
     where
    
    9 9
     
    
    10
    +#include "RtsIfaceStub.h"
    
    11
    +
    
    10 12
     import GHC.Internal.Base
    
    11 13
     
    
    12 14
     #if !defined(javascript_HOST_ARCH)
    

  • libraries/ghc-internal/src/GHC/Internal/Stack/CCS.hsc
    ... ... @@ -47,6 +47,7 @@ import GHC.Internal.List ( concatMap, reverse )
    47 47
     
    
    48 48
     #define PROFILING
    
    49 49
     #include "Rts.h"
    
    50
    +#include "RtsIfaceStub.h"
    
    50 51
     
    
    51 52
     -- | A cost-centre stack from GHC's cost-center profiler.
    
    52 53
     data CostCentreStack
    

  • libraries/ghc-internal/src/GHC/Internal/Stack/Constants.hsc
    ... ... @@ -14,6 +14,7 @@ import GHC.Internal.Real
    14 14
     #undef MBLOCK_SIZE
    
    15 15
     #undef BLOCKS_PER_MBLOCK
    
    16 16
     #include "DerivedConstants.h"
    
    17
    +#include "RtsIfaceStub.h"
    
    17 18
     
    
    18 19
     newtype ByteOffset = ByteOffset { offsetInBytes :: Int }
    
    19 20
       deriving newtype (Eq, Show, Integral, Real, Num, Enum, Ord)
    

  • libraries/ghc-internal/src/GHC/Internal/Stats.hsc
    ... ... @@ -45,6 +45,7 @@ import GHC.Internal.Foreign.Storable
    45 45
     import GHC.Internal.Foreign.Ptr
    
    46 46
     
    
    47 47
     #include "Rts.h"
    
    48
    +#include "RtsIfaceStub.h"
    
    48 49
     
    
    49 50
     foreign import ccall "getRTSStats" getRTSStats_ :: Ptr () -> IO ()
    
    50 51
     
    

  • libraries/ghc-internal/src/GHC/Internal/System/Environment/Blank.hsc
    ... ... @@ -74,6 +74,7 @@ import qualified GHC.Internal.System.Environment as Environment
    74 74
     #endif
    
    75 75
     
    
    76 76
     #include "HsBaseConfig.h"
    
    77
    +#include "RtsIfaceStub.h"
    
    77 78
     
    
    78 79
     throwInvalidArgument :: String -> IO a
    
    79 80
     throwInvalidArgument from =
    

  • libraries/ghc-internal/src/GHC/Internal/System/Environment/ExecutablePath.hsc
    ... ... @@ -104,6 +104,9 @@ import GHC.Internal.Foreign.Storable
    104 104
     import GHC.Internal.System.Posix.Internals
    
    105 105
     #endif
    
    106 106
     
    
    107
    +#include "RtsIfaceStub.h"
    
    108
    +
    
    109
    +
    
    107 110
     -- The exported function is defined outside any if-guard to make sure
    
    108 111
     -- every OS implements it with the same type.
    
    109 112