Commit 0e7562e8 authored by Ben.Lippmeier@anu.edu.au's avatar Ben.Lippmeier@anu.edu.au
Browse files

Windows DLLs: add #ifdefery to turn off DLL import of libffi when building statically.

parent 158e7136
...@@ -41,7 +41,7 @@ diff -Nur libffi-3.0.8/include/ffi.h.in dllize-3.0.8/include/ffi.h.in ...@@ -41,7 +41,7 @@ diff -Nur libffi-3.0.8/include/ffi.h.in dllize-3.0.8/include/ffi.h.in
#define @TARGET@ #define @TARGET@
#endif #endif
+#if @LIBFFI_DLL@ +#if @LIBFFI_DLL@ && !defined(LIBFFI_NOT_DLL)
+#ifdef DLL_EXPORT +#ifdef DLL_EXPORT
+#define __FFI_DECLSPEC __declspec(__dllexport__) +#define __FFI_DECLSPEC __declspec(__dllexport__)
+#else +#else
......
...@@ -27,6 +27,13 @@ ...@@ -27,6 +27,13 @@
#include <errno.h> #include <errno.h>
#endif #endif
// When building the RTS in the non-dyn way on Windows, we don't
// want declspec(__dllimport__) on the front of function prototypes
// from libffi.
#if defined(mingw32_HOST_OS) && !defined(__PIC__)
# define LIBFFI_NOT_DLL
#endif
#include "ffi.h" #include "ffi.h"
/* -------------------------------------------------------------------------- /* --------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment