Skip to content

Commit f230fa9

Browse files
committed
[GR-65374] Unchained standalone cleanups
PullRequest: truffleruby/4548
2 parents d82957a + 0df2e60 commit f230fa9

File tree

10 files changed

+26
-63
lines changed

10 files changed

+26
-63
lines changed

ci/common.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ local common_json = import "../common.json";
5656
[name]: jdk_base + common_json.jdks[name] + { jdk_version:: 21 }
5757
for name in ["oraclejdk21"] + variants("labsjdk-ce-21") + variants("labsjdk-ee-21")
5858
} + {
59-
'oraclejdk23': jdk_base + common_json.jdks["oraclejdk23"] + { jdk_version:: 23 },
59+
'oraclejdk24': jdk_base + common_json.jdks["oraclejdk24"] + { jdk_version:: 24 },
6060
} + {
6161
[name]: jdk_base + common_json.jdks[name] + { jdk_version:: parse_labsjdk_version(self), jdk_name:: "jdk-latest"}
6262
for name in ["oraclejdk-latest"] + variants("labsjdk-ce-latest") + variants("labsjdk-ee-latest")

common.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
1010
"jdks": {
11-
"galahad-jdk": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+22-2657", "platformspecific": true, "extrabundles": ["static-libs"]},
11+
"galahad-jdk": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+24-2970", "platformspecific": true, "extrabundles": ["static-libs"]},
1212

1313
"oraclejdk17": {"name": "jpg-jdk", "version": "17.0.7", "build_id": "jdk-17.0.7+8", "platformspecific": true, "extrabundles": ["static-libs"]},
1414
"labsjdk-ce-17": {"name": "labsjdk", "version": "ce-17.0.7+4-jvmci-23.1-b02", "platformspecific": true },
@@ -43,15 +43,15 @@
4343
"labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21.0.2+13-jvmci-23.1-b33-sulong", "platformspecific": true },
4444
"graalvm-ee-21": {"name": "graalvm-java21", "version": "23.1.6", "platformspecific": true },
4545

46-
"oraclejdk23": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+37", "platformspecific": true, "extrabundles": ["static-libs"]},
46+
"oraclejdk24": {"name": "jpg-jdk", "version": "24", "build_id": "jdk-24.0.1+9", "platformspecific": true, "extrabundles": ["static-libs"]},
4747

48-
"oraclejdk-latest": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+22", "platformspecific": true, "extrabundles": ["static-libs"]},
49-
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-25+22-jvmci-b01", "platformspecific": true },
50-
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-25+22-jvmci-b01-debug", "platformspecific": true },
51-
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-25+22-jvmci-b01-sulong", "platformspecific": true },
52-
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-25+22-jvmci-b01", "platformspecific": true },
53-
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-25+22-jvmci-b01-debug", "platformspecific": true },
54-
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-25+22-jvmci-b01-sulong", "platformspecific": true }
48+
"oraclejdk-latest": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+24", "platformspecific": true, "extrabundles": ["static-libs"]},
49+
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-25+24-jvmci-b01", "platformspecific": true },
50+
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-25+24-jvmci-b01-debug", "platformspecific": true },
51+
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-25+24-jvmci-b01-sulong", "platformspecific": true },
52+
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-25+24-jvmci-b01", "platformspecific": true },
53+
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-25+24-jvmci-b01-debug", "platformspecific": true },
54+
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-25+24-jvmci-b01-sulong", "platformspecific": true }
5555
},
5656

5757
"eclipse": {

mx.truffleruby/jvm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
DYNAMIC_IMPORTS=/tools
22
BUILD_TARGETS=TRUFFLERUBY_JVM_STANDALONE
3+
EXCLUDE_TRUFFLE_RUNTIME=true

mx.truffleruby/jvm-ee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
DYNAMIC_IMPORTS=/tools,/graal-enterprise,/truffle-enterprise,/sulong-managed
1+
DYNAMIC_IMPORTS=/tools,/graal-enterprise,/truffle-enterprise
22
BUILD_TARGETS=TRUFFLERUBY_JVM_STANDALONE

mx.truffleruby/jvm-ee-libgraal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DYNAMIC_IMPORTS=/tools,/graal-enterprise,/truffle-enterprise,/sulong-managed,/substratevm-enterprise
1+
DYNAMIC_IMPORTS=/tools,/graal-enterprise,/truffle-enterprise,/substratevm-enterprise
22
BUILD_TARGETS=TRUFFLERUBY_JVM_STANDALONE
33
COMPONENTS=LibGraal Enterprise
44
NATIVE_IMAGES=lib:jvmcicompiler

mx.truffleruby/mx_truffleruby.py

Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import mx_gate
2121
import mx_sdk
2222
import mx_sdk_vm
23+
import mx_sdk_vm_ng
2324
import mx_subst
2425
import mx_spotbugs
2526
import mx_truffle
@@ -189,21 +190,12 @@ def __init__(self, suite, name, deps, workingSets, output=None, **kwArgs):
189190

190191
# Functions called from suite.py
191192

192-
def has_suite(name):
193-
return mx.suite(name, fatalIfMissing=False)
194-
195-
def is_ee():
196-
return has_suite('truffle-enterprise')
197-
198193
def truffleruby_standalone_deps():
199-
deps = mx_truffle.resolve_truffle_dist_names(use_optimized_runtime=has_suite('compiler'))
200-
if is_ee():
201-
deps += ['sulong-managed:SULONG_ENTERPRISE_NATIVE']
202-
return deps
194+
include_truffle_runtime = not mx.env_var_to_bool("EXCLUDE_TRUFFLE_RUNTIME")
195+
return mx_truffle.resolve_truffle_dist_names(use_optimized_runtime=include_truffle_runtime)
203196

204197
def librubyvm_build_args():
205-
if is_ee() and mx.get_os() == 'linux' and 'NATIVE_IMAGE_AUXILIARY_ENGINE_CACHE' not in os.environ:
206-
mx.suite('substratevm-enterprise-gcs', fatalIfMissing=True) # fail early if missing
198+
if mx_sdk_vm_ng.is_nativeimage_ee() and mx.get_os() == 'linux' and 'NATIVE_IMAGE_AUXILIARY_ENGINE_CACHE' not in os.environ:
207199
return ['--gc=G1', '-H:-ProtectionKeys']
208200
else:
209201
return []
@@ -322,39 +314,16 @@ def ruby_maven_deploy_public_repo_dir(args):
322314
'truffleruby:TRUFFLERUBY_GRAALVM_LICENSES',
323315
],
324316
priority=5,
325-
stability="experimental",
326-
))
327-
328-
# Only keep what we need from the Sulong home.
329-
# Exclude the toolchain launchers, we don't need them, and they would not work in the native standalone.
330-
# Excluding "native/bin" or "native/bin/*" does not work so we have to list them.
331-
toolchain_launchers = ['binutil', 'clang', 'clang++', 'clang-cl', 'flang', 'ld']
332-
sulong_home_excludes = [f"native/bin/graalvm-native-{launcher}" for launcher in toolchain_launchers] + \
333-
['native/cmake', 'native/include', 'native/lib/*++*', 'native/share']
334-
standalone_dependencies_common = {
335-
'LLVM Runtime Core': ('lib/sulong', []),
336-
'LLVM Runtime Native': ('lib/sulong', sulong_home_excludes),
337-
}
317+
stability="experimental"))
338318

339319
mx_sdk_vm.register_graalvm_component(mx_sdk_vm.GraalVmLanguage(
340320
suite=_suite,
341321
name='TruffleRuby',
342322
short_name='rby',
343323
dir_name='ruby',
344-
standalone_dir_name='truffleruby-community-<version>-<graalvm_os>-<arch>',
345-
standalone_dir_name_enterprise='truffleruby-<version>-<graalvm_os>-<arch>',
346324
license_files=[],
347325
third_party_license_files=[],
348326
dependencies=['rbyl', 'Truffle', 'Truffle NFI', 'LLVM Runtime Native', 'TRegex'], # Use short name for license to select by priority
349-
standalone_dependencies={**standalone_dependencies_common, **{
350-
'TruffleRuby license files': ('', []),
351-
}},
352-
standalone_dependencies_enterprise={**standalone_dependencies_common, **{
353-
'LLVM Runtime Enterprise': ('lib/sulong', []), # sulong-managed:SULONG_ENTERPRISE
354-
'LLVM Runtime Native Enterprise': ('lib/sulong', []), # sulong-managed:SULONG_ENTERPRISE_NATIVE
355-
'TruffleRuby license files EE': ('', []),
356-
'GraalVM enterprise license files': ('', ['LICENSE.txt', 'GRAALVM-README.md']),
357-
}},
358327
truffle_jars=[
359328
# Distributions
360329
'truffleruby:TRUFFLERUBY',
@@ -402,16 +371,7 @@ def ruby_maven_deploy_public_repo_dir(args):
402371
]
403372
)
404373
],
405-
stability="experimental",
406-
post_install_msg="""
407-
IMPORTANT NOTE:
408-
---------------
409-
The Ruby openssl C extension needs to be recompiled on your system to work with the installed libssl.
410-
First, make sure TruffleRuby's dependencies are installed, which are described at:
411-
https://github.com/oracle/truffleruby/blob/master/README.md#dependencies
412-
Then run the following command:
413-
${graalvm_languages_dir}/ruby/lib/truffle/post_install_hook.sh""",
414-
))
374+
stability="experimental"))
415375

416376
mx.update_commands(_suite, {
417377
'ruby': [ruby_run_ruby, ''],

mx.truffleruby/native-ee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DYNAMIC_IMPORTS=/tools,/graal-enterprise,/truffle-enterprise,/sulong-managed,/substratevm-enterprise,substratevm-enterprise-gcs
1+
DYNAMIC_IMPORTS=/tools,/graal-enterprise,/truffle-enterprise,/substratevm-enterprise,substratevm-enterprise-gcs
22
BUILD_TARGETS=TRUFFLERUBY_NATIVE_STANDALONE
33
COMPONENTS=SubstrateVM Enterprise,Truffle SVM Macro Enterprise,suite:substratevm-enterprise-gcs
44
NATIVE_IMAGES=lib:rubyvm

mx.truffleruby/native-ee-aux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DYNAMIC_IMPORTS=/tools,/graal-enterprise,/truffle-enterprise,/sulong-managed,/substratevm-enterprise
1+
DYNAMIC_IMPORTS=/tools,/graal-enterprise,/truffle-enterprise,/substratevm-enterprise
22
BUILD_TARGETS=TRUFFLERUBY_NATIVE_STANDALONE
33
COMPONENTS=SubstrateVM Enterprise,Truffle SVM Macro Enterprise
44
NATIVE_IMAGES=lib:rubyvm

mx.truffleruby/native-ee-host-inlining

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DYNAMIC_IMPORTS=/tools,/graal-enterprise,/truffle-enterprise,/sulong-managed,/substratevm-enterprise,substratevm-enterprise-gcs
1+
DYNAMIC_IMPORTS=/tools,/graal-enterprise,/truffle-enterprise,/substratevm-enterprise,substratevm-enterprise-gcs
22
BUILD_TARGETS=TRUFFLERUBY_NATIVE_STANDALONE
33
COMPONENTS=SubstrateVM Enterprise,Truffle SVM Macro Enterprise,suite:substratevm-enterprise-gcs
44
NATIVE_IMAGES=lib:rubyvm

mx.truffleruby/suite.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
{
2323
"name": "regex",
2424
"subdir": True,
25-
"version": "ed067f1f7c575a638991d34bcab15f895a4b26b7",
25+
"version": "244745f9c31b747826fc7ca75f2b4c1732bbf215",
2626
"urls": [
2727
{"url": "https://github.com/oracle/graal.git", "kind": "git"},
2828
{"url": "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind": "binary"},
@@ -31,7 +31,7 @@
3131
{
3232
"name": "sulong",
3333
"subdir": True,
34-
"version": "ed067f1f7c575a638991d34bcab15f895a4b26b7",
34+
"version": "244745f9c31b747826fc7ca75f2b4c1732bbf215",
3535
"urls": [
3636
{"url": "https://github.com/oracle/graal.git", "kind": "git"},
3737
{"url": "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind": "binary"},
@@ -994,6 +994,7 @@
994994
"standalone_dist": "TRUFFLERUBY_NATIVE_STANDALONE",
995995
"community_archive_name": "truffleruby-community",
996996
"enterprise_archive_name": "truffleruby",
997+
"language_id": "ruby",
997998
},
998999

9991000
"TRUFFLERUBY_JVM_STANDALONE_RELEASE_ARCHIVE": {
@@ -1002,6 +1003,7 @@
10021003
"standalone_dist": "TRUFFLERUBY_JVM_STANDALONE",
10031004
"community_archive_name": "truffleruby-community-jvm",
10041005
"enterprise_archive_name": "truffleruby-jvm",
1006+
"language_id": "ruby",
10051007
},
10061008

10071009
"TRUFFLERUBY_GRAALVM_LICENSES": {

0 commit comments

Comments
 (0)