Skip to content

Commit 34487a9

Browse files
committed
[GR-66120] Remove the polyglot launcher and libpolyglot
1 parent 4d2c2a0 commit 34487a9

File tree

3 files changed

+3
-71
lines changed

3 files changed

+3
-71
lines changed

docs/reference-manual/llvm/Interoperability.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ cpart.freeNativePoint(point);
8989
cpart.freeNativePoint(pointArray);
9090
```
9191

92-
Finally, run this JavaScript file:
92+
Finally, run this JavaScript file on a [GraalJS JVM standalone](https://github.com/oracle/graaljs/releases):
9393
```shell
94+
js-polyglot-get llvm
9495
js --polyglot jspart.js
9596
Point<5.000000,7.000000>
9697
Point<3.000000,6.000000>

sdk/mx.sdk/mx_sdk_vm_impl.py

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -109,31 +109,6 @@ def svm_experimental_options(experimental_options):
109109
return ['-H:+UnlockExperimentalVMOptions'] + experimental_options + ['-H:-UnlockExperimentalVMOptions']
110110

111111

112-
mx_sdk_vm.register_graalvm_component(mx_sdk_vm.GraalVmJreComponent(
113-
suite=_suite,
114-
name='Polyglot Launcher',
115-
short_name='poly',
116-
license_files=[],
117-
third_party_license_files=[],
118-
dir_name='polyglot',
119-
launcher_configs=[mx_sdk_vm.LauncherConfig(
120-
destination='bin/<exe:polyglot>',
121-
jar_distributions=['sdk:LAUNCHER_COMMON'],
122-
main_class='org.graalvm.launcher.PolyglotLauncher',
123-
build_args=[
124-
'--features=org.graalvm.launcher.PolyglotLauncherFeature',
125-
'--tool:all',
126-
] + svm_experimental_options(['-H:-ParseRuntimeOptions']),
127-
# No need to pass --enable-native-access=org.graalvm.shadowed.jline, because the polyglot bash launcher
128-
# script adds JLine to class-path, not module-path, so we do not need to enable native access
129-
is_main_launcher=True,
130-
default_symlinks=True,
131-
is_sdk_launcher=True,
132-
is_polyglot=True,
133-
)],
134-
))
135-
136-
137112
def gate_body(args, tasks):
138113
with mx_gate.Task('Sdk: GraalVM dist names', tasks, tags=['names']) as t:
139114
if t:
@@ -179,44 +154,6 @@ def add_dependencies(dependencies, excludes=True):
179154
add_dependencies([mx_sdk.graalvm_component_by_name(name) for name in default_components], excludes=True)
180155
add_dependencies(components_include_list, excludes=True)
181156

182-
# The polyglot library must be the last component that we register, since it depends on the other ones.
183-
# To avoid registering it twice (once when `stage1 == False` and once when `stage1 == True`), we check that
184-
# `libpoly` is not part of `registered_short_names`.
185-
# Even when the polyglot library is already registered, we still need to add its dependencies to the current
186-
# GraalVM (see call to `add_dependencies()`.
187-
registered_short_names = [c.short_name for c in mx_sdk_vm.graalvm_components()]
188-
if _with_polyglot_lib_project() and libpoly_has_entrypoints:
189-
if 'libpoly' in registered_short_names:
190-
libpolyglot_component = mx_sdk_vm.graalvm_component_by_name('libpoly')
191-
else:
192-
libpolyglot_component = mx_sdk_vm.GraalVmJreComponent(
193-
suite=_suite,
194-
name='Polyglot Library',
195-
short_name='libpoly',
196-
license_files=[],
197-
third_party_license_files=[],
198-
dir_name='polyglot',
199-
library_configs=[mx_sdk_vm.LibraryConfig(
200-
destination='<lib:polyglot>',
201-
# We can ignore `component.polyglot_lib_jar_dependencies` because, when building a native image,
202-
# the `GraalVmNativeImage` project has a build-time dependency to Stage1
203-
jar_distributions=[],
204-
build_args=[
205-
'-J-Xms20G',
206-
'-Dgraalvm.libpolyglot=true',
207-
'-Dorg.graalvm.polyglot.install_name_id=@rpath/<jre_home>/lib/polyglot/<lib:polyglot>',
208-
'--tool:all',
209-
],
210-
is_polyglot=True,
211-
build_time=25,
212-
)],
213-
)
214-
mx_sdk_vm.register_graalvm_component(libpolyglot_component)
215-
add_dependencies([libpolyglot_component])
216-
217-
if libpoly_build_dependencies:
218-
mx.warn("Ignoring build dependency '{}' of '{}'. It should be already part of stage 1.".format(libpoly_build_dependencies, libpolyglot_component.name))
219-
220157
ni_component = mx_sdk_vm.graalvm_component_by_name('ni', fatalIfMissing=False)
221158
niee_component = mx_sdk_vm.graalvm_component_by_name('niee', fatalIfMissing=False)
222159
if stage1:
@@ -3759,8 +3696,6 @@ def _components_include_list():
37593696

37603697
def _excluded_components():
37613698
excluded = _parse_cmd_arg('exclude_components', parse_bool=False, default_value='')
3762-
if mx.get_opts().disable_polyglot or _env_var_to_bool('DISABLE_POLYGLOT'):
3763-
excluded.append('poly')
37643699

37653700
expanded = []
37663701
for name in excluded:
@@ -3805,10 +3740,6 @@ def graalvm_skip_archive():
38053740
return mx.get_opts().graalvm_skip_archive or _env_var_to_bool('GRAALVM_SKIP_ARCHIVE')
38063741

38073742

3808-
def _with_polyglot_lib_project():
3809-
return not (mx.get_opts().disable_libpolyglot or _env_var_to_bool('DISABLE_LIBPOLYGLOT'))
3810-
3811-
38123743
def _expand_native_images_list(only):
38133744
if isinstance(only, list):
38143745
native_images = []

vm/mx.vm/mx_vm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def local_path_to_url(args):
150150
mx_sdk_vm.register_vm_config('community', ce_unchained_components, _suite, env_file='ce')
151151
# Other GraalVMs
152152
mx_sdk_vm.register_vm_config('ce', ce_components + ['icu4j', 'xz', 'js', 'jsl', 'jss', 'rgx', 'bnative-image', 'snative-image-agent', 'snative-image-diagnostics-agent', 'tflsm'], _suite, dist_name='ce-js', env_file='ce-js')
153-
mx_sdk_vm.register_vm_config('ce', ce_components + ['gwal', 'gwa', 'icu4j', 'xz', 'js', 'jsl', 'jss', 'libpoly', 'njs', 'njsl', 'rgx', 'sjsvm', 'spolyglot', 'swasmvm'], _suite, dist_name='ce', env_file='ce-nodejs')
153+
mx_sdk_vm.register_vm_config('ce', ce_components + ['gwal', 'gwa', 'icu4j', 'xz', 'js', 'jsl', 'jss', 'njs', 'njsl', 'rgx', 'sjsvm', 'swasmvm'], _suite, dist_name='ce', env_file='ce-nodejs')
154154
mx_sdk_vm.register_vm_config('ce', ce_components_minimal + ['antlr4', 'llrn', 'llp', 'llrc', 'llrl', 'llrlf'], _suite, env_file='ce-llvm')
155155
mx_sdk_vm.register_vm_config('ce-python', ce_python_components, _suite)
156156
mx_sdk_vm.register_vm_config('ce-fastr', ce_fastr_components, _suite)

0 commit comments

Comments
 (0)