|
20 | 20 | import mx_gate
|
21 | 21 | import mx_sdk
|
22 | 22 | import mx_sdk_vm
|
| 23 | +import mx_sdk_vm_ng |
23 | 24 | import mx_subst
|
24 | 25 | import mx_spotbugs
|
25 | 26 | import mx_truffle
|
@@ -189,21 +190,15 @@ def __init__(self, suite, name, deps, workingSets, output=None, **kwArgs):
|
189 | 190 |
|
190 | 191 | # Functions called from suite.py
|
191 | 192 |
|
192 |
| -def has_suite(name): |
193 |
| - return mx.suite(name, fatalIfMissing=False) |
194 |
| - |
195 |
| -def is_ee(): |
196 |
| - return has_suite('truffle-enterprise') |
197 |
| - |
198 | 193 | def truffleruby_standalone_deps():
|
199 |
| - deps = mx_truffle.resolve_truffle_dist_names(use_optimized_runtime=has_suite('compiler')) |
200 |
| - if is_ee(): |
| 194 | + include_truffle_runtime = not mx.env_var_to_bool("EXCLUDE_TRUFFLE_RUNTIME") |
| 195 | + deps = mx_truffle.resolve_truffle_dist_names(use_optimized_runtime=include_truffle_runtime) |
| 196 | + if mx_sdk_vm_ng.uses_enterprise_sources(): |
201 | 197 | deps += ['sulong-managed:SULONG_ENTERPRISE_NATIVE']
|
202 | 198 | return deps
|
203 | 199 |
|
204 | 200 | 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 |
| 201 | + if mx_sdk_vm_ng.is_nativeimage_ee() and mx.get_os() == 'linux' and 'NATIVE_IMAGE_AUXILIARY_ENGINE_CACHE' not in os.environ: |
207 | 202 | return ['--gc=G1', '-H:-ProtectionKeys']
|
208 | 203 | else:
|
209 | 204 | return []
|
@@ -322,39 +317,16 @@ def ruby_maven_deploy_public_repo_dir(args):
|
322 | 317 | 'truffleruby:TRUFFLERUBY_GRAALVM_LICENSES',
|
323 | 318 | ],
|
324 | 319 | 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 |
| -} |
| 320 | + stability="experimental")) |
338 | 321 |
|
339 | 322 | mx_sdk_vm.register_graalvm_component(mx_sdk_vm.GraalVmLanguage(
|
340 | 323 | suite=_suite,
|
341 | 324 | name='TruffleRuby',
|
342 | 325 | short_name='rby',
|
343 | 326 | dir_name='ruby',
|
344 |
| - standalone_dir_name='truffleruby-community-<version>-<graalvm_os>-<arch>', |
345 |
| - standalone_dir_name_enterprise='truffleruby-<version>-<graalvm_os>-<arch>', |
346 | 327 | license_files=[],
|
347 | 328 | third_party_license_files=[],
|
348 | 329 | 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 |
| - }}, |
358 | 330 | truffle_jars=[
|
359 | 331 | # Distributions
|
360 | 332 | 'truffleruby:TRUFFLERUBY',
|
@@ -402,16 +374,7 @@ def ruby_maven_deploy_public_repo_dir(args):
|
402 | 374 | ]
|
403 | 375 | )
|
404 | 376 | ],
|
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 |
| -)) |
| 377 | + stability="experimental")) |
415 | 378 |
|
416 | 379 | mx.update_commands(_suite, {
|
417 | 380 | 'ruby': [ruby_run_ruby, ''],
|
|
0 commit comments