Skip to content

Commit e1e44d2

Browse files
committed
extconf: Only apply jRuby hacks for jruby<9.2.8.0
1 parent 5f98917 commit e1e44d2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ext/extconf.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,14 @@
7070
MakeMakefile.send(:remove_const, :EXPORT_PREFIX)
7171
MakeMakefile::EXPORT_PREFIX = nil
7272

73-
if RUBY_PLATFORM == 'java'
74-
# COUTFLAG is not set correctly on jruby
73+
if RUBY_ENGINE == 'jruby' &&
74+
Gem::Version.new(RUBY_ENGINE_VERSION) < Gem::Version.new('9.2.8.0')
75+
# COUTFLAG is not set correctly on jruby<9.2.8.0
7576
# See https://github.com/jruby/jruby/issues/5749
7677
MakeMakefile.send(:remove_const, :COUTFLAG)
7778
MakeMakefile::COUTFLAG = '-o $(empty)'
7879

79-
# CCDLFLAGS is not set correctly on jruby
80+
# CCDLFLAGS is not set correctly on jruby<9.2.8.0
8081
# See https://github.com/jruby/jruby/issues/5751
8182
$CXXFLAGS << ' -fPIC'
8283
end

0 commit comments

Comments
 (0)