@@ -278,6 +278,10 @@ def truffleruby?
278
278
@truffleruby ||= File . executable? ( truffleruby_launcher_path )
279
279
end
280
280
281
+ def truffleruby_jvm?
282
+ truffleruby? and !truffleruby_native?
283
+ end
284
+
281
285
def truffleruby_launcher_path
282
286
require_ruby_launcher!
283
287
@truffleruby_launcher_path ||= File . expand_path ( '../truffleruby' , @ruby_launcher_realpath )
@@ -869,7 +873,7 @@ def rebuild(*options)
869
873
when '--no-core-load-path'
870
874
core_load_path = false
871
875
when '--reveal'
872
- vm_args += %w[ --vm.ea --vm.esa ] unless truffleruby_native ?
876
+ vm_args += %w[ --vm.ea --vm.esa ] if truffleruby_jvm ?
873
877
when '--check-compilation'
874
878
add_experimental_options . call
875
879
vm_args << '--engine.CompilationFailureAction=ExitVM'
@@ -889,7 +893,7 @@ def rebuild(*options)
889
893
add_experimental_options . call
890
894
vm_args << '--exceptions-print-uncaught-java=true'
891
895
when '--infopoints'
892
- unless truffleruby_native ?
896
+ if truffleruby_jvm ?
893
897
vm_args << '--vm.XX:+UnlockDiagnosticVMOptions' << '--vm.XX:+DebugNonSafepoints'
894
898
end
895
899
vm_args << '--engine.NodeSourcePositions=true'
@@ -915,14 +919,13 @@ def rebuild(*options)
915
919
end
916
920
end
917
921
918
- if truffleruby? && !truffleruby_native?
919
- if core_load_path
920
- add_experimental_options . call
921
- vm_args << "--core-load-path=#{ TRUFFLERUBY_DIR } /src/main/ruby/truffleruby"
922
- end
923
- if ci?
924
- vm_args << '--vm.Xlog:os+thread=off' # GR-23507: prevent thread warnings on stdout to break specs/tests
925
- end
922
+ if core_load_path and truffleruby_jvm?
923
+ add_experimental_options . call
924
+ vm_args << "--core-load-path=#{ TRUFFLERUBY_DIR } /src/main/ruby/truffleruby"
925
+ end
926
+
927
+ if ci? and truffleruby_jvm?
928
+ vm_args << '--vm.Xlog:os+thread=off' # GR-23507: prevent thread warnings on stdout to break specs/tests
926
929
end
927
930
928
931
[ vm_args , ruby_args + args , options ]
@@ -1514,7 +1517,7 @@ def mspec(*args)
1514
1517
1515
1518
vm_args , ruby_args , parsed_options = ruby_options ( { } , [ '--reveal' , *ruby_args ] )
1516
1519
vm_args << ( truffleruby_native? ? '--vm.Xmx3G' : '--vm.Xmx2G' )
1517
- vm_args << '--polyglot' unless truffleruby_native ?
1520
+ vm_args << '--polyglot' if truffleruby_jvm ?
1518
1521
# Until pattern matching is complete, we enable it in specs but not globally
1519
1522
vm_args << '--experimental-options' << '--pattern-matching'
1520
1523
0 commit comments