[Git][ghc/ghc][wip/27162/rts-explicit-dllimport_work] fixup! Use __attribute__((dllimport)) for external RTS symbol declarations
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 fixup! Use __attribute__((dllimport)) for external RTS symbol declarations - - - - - 1 changed file: - rts/RtsSymbols.c Changes: ===================================== rts/RtsSymbols.c ===================================== @@ -10,6 +10,7 @@ #include "Rts.h" #include "RtsSymbols.h" #include "LinkerInternals.h" +#include "PathUtils.h" #include "TopHandler.h" #include "HsFFI.h" @@ -54,6 +55,7 @@ extern char **environ; * Symbols to be inserted into the RTS symbol table. * * Note [Naming Scheme for Symbol Macros] + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * * SymI_*: symbol is internal to the RTS. It resides in an object * file/library that is statically. @@ -1166,10 +1168,16 @@ extern char **environ; * * The claims about the types of these symbols are entirely bogus. */ -#define SymI_NeedsProto(vvv) extern void vvv(void); -#define SymI_NeedsDataProto(vvv) extern StgWord vvv[]; -#define SymE_NeedsProto(vvv) extern __attribute__((dllimport)) void vvv(void); -#define SymE_NeedsDataProto(vvv) extern __attribute__((dllimport)) StgWord vvv[]; +#if defined(mingw32_HOST_OS) && defined(DYNAMIC) +#define DLLIMPORT __attribute__((dllimport)) +#else +#define DLLIMPORT /**/ +#endif + +#define SymI_NeedsProto(vvv) extern void vvv(void); +#define SymI_NeedsDataProto(vvv) extern StgWord vvv[]; +#define SymE_NeedsProto(vvv) extern DLLIMPORT void vvv(void); +#define SymE_NeedsDataProto(vvv) extern DLLIMPORT StgWord vvv[]; #define SymE_HasProto(vvv) /**/ #define SymI_HasProto(vvv) /**/ View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c6dde4423c23323eca39bd8484698963... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c6dde4423c23323eca39bd8484698963... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
David Eichmann (@DavidEichmann)