David Eichmann pushed to branch wip/27162/rts-explicit-dllimport_work at Glasgow Haskell Compiler / GHC
Commits:
-
c6dde442
by David Eichmann at 2026-04-28T16:18:49+01:00
1 changed file:
Changes:
| ... | ... | @@ -10,6 +10,7 @@ |
| 10 | 10 | #include "Rts.h"
|
| 11 | 11 | #include "RtsSymbols.h"
|
| 12 | 12 | #include "LinkerInternals.h"
|
| 13 | +#include "PathUtils.h"
|
|
| 13 | 14 | |
| 14 | 15 | #include "TopHandler.h"
|
| 15 | 16 | #include "HsFFI.h"
|
| ... | ... | @@ -54,6 +55,7 @@ extern char **environ; |
| 54 | 55 | * Symbols to be inserted into the RTS symbol table.
|
| 55 | 56 | *
|
| 56 | 57 | * Note [Naming Scheme for Symbol Macros]
|
| 58 | + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
| 57 | 59 | *
|
| 58 | 60 | * SymI_*: symbol is internal to the RTS. It resides in an object
|
| 59 | 61 | * file/library that is statically.
|
| ... | ... | @@ -1166,10 +1168,16 @@ extern char **environ; |
| 1166 | 1168 | *
|
| 1167 | 1169 | * The claims about the types of these symbols are entirely bogus.
|
| 1168 | 1170 | */
|
| 1169 | -#define SymI_NeedsProto(vvv) extern void vvv(void);
|
|
| 1170 | -#define SymI_NeedsDataProto(vvv) extern StgWord vvv[];
|
|
| 1171 | -#define SymE_NeedsProto(vvv) extern __attribute__((dllimport)) void vvv(void);
|
|
| 1172 | -#define SymE_NeedsDataProto(vvv) extern __attribute__((dllimport)) StgWord vvv[];
|
|
| 1171 | +#if defined(mingw32_HOST_OS) && defined(DYNAMIC)
|
|
| 1172 | +#define DLLIMPORT __attribute__((dllimport))
|
|
| 1173 | +#else
|
|
| 1174 | +#define DLLIMPORT /**/
|
|
| 1175 | +#endif
|
|
| 1176 | + |
|
| 1177 | +#define SymI_NeedsProto(vvv) extern void vvv(void);
|
|
| 1178 | +#define SymI_NeedsDataProto(vvv) extern StgWord vvv[];
|
|
| 1179 | +#define SymE_NeedsProto(vvv) extern DLLIMPORT void vvv(void);
|
|
| 1180 | +#define SymE_NeedsDataProto(vvv) extern DLLIMPORT StgWord vvv[];
|
|
| 1173 | 1181 | |
| 1174 | 1182 | #define SymE_HasProto(vvv) /**/
|
| 1175 | 1183 | #define SymI_HasProto(vvv) /**/
|