diff options
Diffstat (limited to 'mjit.h')
-rw-r--r-- | mjit.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -11,6 +11,18 @@ #include "ruby.h" +/* On mswin, MJIT header transformation can't be used since cl.exe can't output + preprocessed output preserving macros. So this `MJIT_STATIC` is needed + to force non-static function to static on MJIT header to avoid symbol conflict. + `MJIT_FUNC_EXPORTED` is also changed to `static` on MJIT header for the same reason. */ +#ifdef MJIT_HEADER +# define MJIT_STATIC static +# undef MJIT_FUNC_EXPORTED +# define MJIT_FUNC_EXPORTED static +#else +# define MJIT_STATIC +#endif + /* Special address values of a function generated from the corresponding iseq by MJIT: */ enum rb_mjit_iseq_func { |