diff options
author | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-07 14:00:04 +0000 |
---|---|---|
committer | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-07 14:00:04 +0000 |
commit | fd719c59e9ace1a71e3e292c61ecc77e7a1d2318 (patch) | |
tree | 6121e61287f2ee5bac48c79aa305f5b31c15a401 /include/ruby/defines.h | |
parent | d590027fd24924d33e6858706c3c8235aa19255c (diff) | |
download | ruby-fd719c59e9ace1a71e3e292c61ecc77e7a1d2318.tar.gz |
include/ruby/intern.h: don't modify MJIT_FUNC_EXPORTED
on most of platforms except mswin.
Changing it to static was needed for mswin because it doesn't use
transform_mjit_header, but for platforms that use it, it causes link
error like:
/usr/bin/ld: /tmp/_ruby_mjit_p21652u0.o: relocation R_X86_64_PC32 against undefined symbol `rb_vm_search_method_slowpath' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
include/ruby/defines.h: MJIT_FUNC_EXPORTED moved to intern.h
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/defines.h')
-rw-r--r-- | include/ruby/defines.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/ruby/defines.h b/include/ruby/defines.h index b7409a3e6c..fb80813f05 100644 --- a/include/ruby/defines.h +++ b/include/ruby/defines.h @@ -361,6 +361,11 @@ ruby_xrealloc2_with_location(void *ptr, size_t s1, size_t s2, const char *file, #define MJIT_SYMBOL_EXPORT_BEGIN RUBY_SYMBOL_EXPORT_BEGIN #define MJIT_SYMBOL_EXPORT_END RUBY_SYMBOL_EXPORT_END +#if defined(MJIT_HEADER) && defined(_MSC_VER) +# undef MJIT_FUNC_EXPORTED +# define MJIT_FUNC_EXPORTED static +#endif + #ifndef RUBY_EXTERN #define RUBY_EXTERN extern #endif |