diff options
author | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-07 13:11:27 +0000 |
---|---|---|
committer | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-07 13:11:27 +0000 |
commit | 950d1007005a6d3aa961e7b299c99dccd71a2efc (patch) | |
tree | c5a935aea06cf874a03759fefcb94677fe2c785e /mjit.h | |
parent | b62c1a22b30ac0108280fe2ba99254f605623972 (diff) |
mjit.h: introduce MJIT_STATIC for full mswin JIT support
This change resolves most of major remaining MJIT bugs on mswin.
Since Visual Studio doesn't support generating pre-processed code
preserving macros, we can't use transform_mjit_header approach for mswin.
So we need to transform MJIT header using macro like this.
vm.c: use MJIT_STATIC for non-static functions that exist on MJIT header
and cause conflict on link.
vm_insnhelper.c: ditto
test_jit.rb: remove many skips for mswin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 { |