Skip to content

[GR-47035] Create JVM standalones by default for jvm* env files #3218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ci.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ local part_definitions = {

run: {
test_unit_tck: {
run+: jt(["test", "unit", "--verbose"]) +
run+: jt(["mx", "build"]) +
jt(["test", "unit", "--verbose"]) +
jt(["test", "tck"])
},

Expand Down
3 changes: 3 additions & 0 deletions mx.truffleruby/jvm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
GRAALVM_SKIP_ARCHIVE=true
DYNAMIC_IMPORTS=/tools
COMPONENTS=TruffleRuby,suite:tools
# To also create the standalone
INSTALLABLES=TruffleRuby
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES
3 changes: 3 additions & 0 deletions mx.truffleruby/jvm-ce
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
GRAALVM_SKIP_ARCHIVE=true
DYNAMIC_IMPORTS=/tools,/compiler
COMPONENTS=TruffleRuby,suite:tools,GraalVM compiler
# To also create the standalone
INSTALLABLES=TruffleRuby
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES
3 changes: 3 additions & 0 deletions mx.truffleruby/jvm-ce-libgraal
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ GRAALVM_SKIP_ARCHIVE=true
DYNAMIC_IMPORTS=/tools,/compiler,/substratevm
COMPONENTS=TruffleRuby,suite:tools,GraalVM compiler,SubstrateVM,LibGraal
NATIVE_IMAGES=suite:sulong,lib:jvmcicompiler
# To also create the standalone
INSTALLABLES=TruffleRuby
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES
3 changes: 3 additions & 0 deletions mx.truffleruby/jvm-ce-ntl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ GRAALVM_SKIP_ARCHIVE=true
DYNAMIC_IMPORTS=/tools,/compiler,/substratevm
COMPONENTS=TruffleRuby,suite:tools,GraalVM compiler,SubstrateVM
NATIVE_IMAGES=suite:sulong
# To also create the standalone
INSTALLABLES=TruffleRuby
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES
3 changes: 3 additions & 0 deletions mx.truffleruby/jvm-ee
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
GRAALVM_SKIP_ARCHIVE=true
DYNAMIC_IMPORTS=/tools,/truffleruby-enterprise,/graal-enterprise
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler,Truffle enterprise
# To also create the standalone
INSTALLABLES=TruffleRuby
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES
3 changes: 3 additions & 0 deletions mx.truffleruby/jvm-ee-libgraal
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ GRAALVM_SKIP_ARCHIVE=true
DYNAMIC_IMPORTS=/tools,/truffleruby-enterprise,/graal-enterprise,/substratevm-enterprise
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler,Truffle enterprise,SubstrateVM Enterprise,LibGraal Enterprise
NATIVE_IMAGES=suite:sulong,lib:jvmcicompiler
# To also create the standalone
INSTALLABLES=TruffleRuby
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES
3 changes: 3 additions & 0 deletions mx.truffleruby/jvm-ee-ntl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ GRAALVM_SKIP_ARCHIVE=true
DYNAMIC_IMPORTS=/tools,/truffleruby-enterprise,/graal-enterprise,/substratevm-enterprise
COMPONENTS=TruffleRuby,suite:tools,GraalVM enterprise compiler,Truffle enterprise,SubstrateVM Enterprise
NATIVE_IMAGES=suite:sulong
# To also create the standalone
INSTALLABLES=TruffleRuby
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES
3 changes: 2 additions & 1 deletion mx.truffleruby/mx_truffleruby.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,10 @@ def build_truffleruby(args):

def ruby_check_heap_dump(input_args, out=None):
print("mx ruby_check_heap_dump " + " ".join(input_args))
dists = ['TRUFFLERUBY', 'TRUFFLE_NFI', 'SULONG_NATIVE', 'TRUFFLERUBY-TEST']
mx.command_function('build')(['--dependencies', ','.join(dists)])
args = input_args
args.insert(0, "--experimental-options")
dists = ['TRUFFLERUBY', 'TRUFFLE_NFI', 'SULONG_NATIVE', 'TRUFFLERUBY-TEST']
vm_args, truffleruby_args = mx.extract_VM_args(args, useDoubleDash=True, defaultAllVMArgs=False)
vm_args += mx.get_runtime_jvm_args(dists)
# vm_args.append("-agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=y")
Expand Down
1 change: 1 addition & 0 deletions mx.truffleruby/native
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ NATIVE_IMAGES=suite:sulong,lib:rubyvm
EXTRA_IMAGE_BUILDER_ARGUMENTS=rubyvm:-H:BuildOutputJSONFile=native-image-build-rubyvm.json
# To also create the standalone
INSTALLABLES=TruffleRuby
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES
1 change: 1 addition & 0 deletions mx.truffleruby/native-ee
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ NATIVE_IMAGES=suite:sulong,lib:rubyvm
EXTRA_IMAGE_BUILDER_ARGUMENTS=rubyvm:-H:BuildOutputJSONFile=native-image-build-rubyvm.json
# To also create the standalone
INSTALLABLES=TruffleRuby
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES
1 change: 1 addition & 0 deletions mx.truffleruby/native-ee-aux
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ EXTRA_IMAGE_BUILDER_ARGUMENTS=rubyvm:-H:BuildOutputJSONFile=native-image-build-r
NATIVE_IMAGE_AUXILIARY_ENGINE_CACHE=true
# To also create the standalone
INSTALLABLES=TruffleRuby
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES
1 change: 1 addition & 0 deletions mx.truffleruby/native-host-inlining
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ NATIVE_IMAGES=lib:rubyvm
EXTRA_IMAGE_BUILDER_ARGUMENTS=rubyvm:-H:BuildOutputJSONFile=native-image-build-rubyvm.json rubyvm:-H:Log=HostInliningPhase,~CanonicalizerPhase,~GraphBuilderPhase rubyvm:-H:+TruffleHostInliningPrintExplored rubyvm:-Dgraal.LogFile=host-inlining.txt
# To also create the standalone
INSTALLABLES=TruffleRuby
BUILD_TARGETS=GRAALVM,GRAALVM_STANDALONES
1 change: 1 addition & 0 deletions test/mri/excludes/TestAutoload.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
exclude :test_source_location, "needs investigation"
exclude :test_threaded_accessing_inner_constant, "Exception raised:"
exclude :test_autoload_parent_namespace, "expected: /\\/some_const.rb to define SomeNamespace::SomeConst but it didn't/"
exclude :test_autoload_parallel_race, "transient timeout"
7 changes: 6 additions & 1 deletion tool/jt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1165,6 +1165,10 @@ def test(*args)
require_ruby_launcher!
path, *rest = args

if %w[unit unittest tck].include?(path)
puts bold "NOTE: You need `jt mx build` before running `jt test #{path}` to build the relevant test distributions"
end

case path
when nil
%w[specs mri bundle cexts integration gems ecosystem compiler].each do |kind|
Expand All @@ -1187,7 +1191,8 @@ def test(*args)
tests = tests.empty? ? ['org.truffleruby'] : tests
# TODO (eregon, 4 Feb 2019): This should run on GraalVM, not development jars
mx(*mx_options, 'unittest', *unittest_options, *tests)
when 'tck' then mx 'tck', *rest
when 'tck'
mx 'tck', *rest
else
if File.expand_path(path, TRUFFLERUBY_DIR).start_with?("#{TRUFFLERUBY_DIR}/test")
test_mri(*args)
Expand Down
2 changes: 1 addition & 1 deletion tool/make-standalone-distribution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set -e
set -x

# Build
bin/jt build --env native -- --targets=GRAALVM_STANDALONES
bin/jt build --env native

standalone=$(bin/jt mx --env native standalone-home ruby)
release_home="$PWD/mxbuild/truffleruby-standalone"
Expand Down