@@ -278,6 +278,14 @@ 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
+
285
+ def jdk8?
286
+ graalvm_home and !Dir . exist? ( "#{ graalvm_home } /jmods" )
287
+ end
288
+
281
289
def truffleruby_launcher_path
282
290
require_ruby_launcher!
283
291
@truffleruby_launcher_path ||= File . expand_path ( '../truffleruby' , @ruby_launcher_realpath )
@@ -869,7 +877,7 @@ def rebuild(*options)
869
877
when '--no-core-load-path'
870
878
core_load_path = false
871
879
when '--reveal'
872
- vm_args += %w[ --vm.ea --vm.esa ] unless truffleruby_native ?
880
+ vm_args += %w[ --vm.ea --vm.esa ] if truffleruby_jvm ?
873
881
when '--check-compilation'
874
882
add_experimental_options . call
875
883
vm_args << '--engine.CompilationFailureAction=ExitVM'
@@ -889,7 +897,7 @@ def rebuild(*options)
889
897
add_experimental_options . call
890
898
vm_args << '--exceptions-print-uncaught-java=true'
891
899
when '--infopoints'
892
- unless truffleruby_native ?
900
+ if truffleruby_jvm ?
893
901
vm_args << '--vm.XX:+UnlockDiagnosticVMOptions' << '--vm.XX:+DebugNonSafepoints'
894
902
end
895
903
vm_args << '--engine.NodeSourcePositions=true'
@@ -915,11 +923,15 @@ def rebuild(*options)
915
923
end
916
924
end
917
925
918
- if core_load_path && truffleruby? && ! truffleruby_native ?
926
+ if core_load_path and truffleruby_jvm ?
919
927
add_experimental_options . call
920
928
vm_args << "--core-load-path=#{ TRUFFLERUBY_DIR } /src/main/ruby/truffleruby"
921
929
end
922
930
931
+ if ci? and truffleruby_jvm? and !jdk8?
932
+ vm_args << '--vm.Xlog:os+thread=off' # GR-23507: prevent thread warnings on stdout to break specs/tests
933
+ end
934
+
923
935
[ vm_args , ruby_args + args , options ]
924
936
end
925
937
@@ -1509,7 +1521,7 @@ def mspec(*args)
1509
1521
1510
1522
vm_args , ruby_args , parsed_options = ruby_options ( { } , [ '--reveal' , *ruby_args ] )
1511
1523
vm_args << ( truffleruby_native? ? '--vm.Xmx3G' : '--vm.Xmx2G' )
1512
- vm_args << '--polyglot' unless truffleruby_native ?
1524
+ vm_args << '--polyglot' if truffleruby_jvm ?
1513
1525
# Until pattern matching is complete, we enable it in specs but not globally
1514
1526
vm_args << '--experimental-options' << '--pattern-matching'
1515
1527
0 commit comments