Skip to content

Commit 40daebe

Browse files
committed
Remove logic for polyglot and libpolyglot
1 parent 34487a9 commit 40daebe

File tree

10 files changed

+19
-236
lines changed

10 files changed

+19
-236
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,6 @@ jobs:
152152
PRIMARY: "vm"
153153
DYNAMIC_IMPORTS: "/sulong,/substratevm"
154154
NATIVE_IMAGES: "graalvm-native-binutil,graalvm-native-clang,graalvm-native-clang-cl,graalvm-native-clang++,graalvm-native-ld,lib:llvmvm"
155-
DISABLE_POLYGLOT: true
156-
DISABLE_LIBPOLYGLOT: true
157155
- env:
158156
JDK_VERSION: "latest"
159157
GATE_TAGS: "build"

espresso-compiler-stub/mx.espresso-compiler-stub/espresso-ni

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
DYNAMIC_IMPORTS=/vm,/substratevm
33
COMPONENTS=Java on Truffle,Espresso Standalone jvm.cfg,SubstrateVM,tflm,ni,sdkni,svmt,svmsl,tflc,tflsm,ecs
44
NATIVE_IMAGES=lib:javavm
5-
DISABLE_LIBPOLYGLOT=true

espresso-compiler-stub/mx.espresso-compiler-stub/espresso-ni-jvm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
DYNAMIC_IMPORTS=/vm,/substratevm
33
COMPONENTS=Espresso Launcher,LibGraal,Java on Truffle,SubstrateVM,Java on Truffle LLVM Java libraries,tflm,ni,sdkni,svmt,svmsl,tflc,tflsm,ecs
44
NATIVE_IMAGES=lib:jvmcicompiler
5-
DISABLE_LIBPOLYGLOT=true

espresso/mx.espresso/mx_espresso.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,6 @@ def contents(self):
429429
truffle_jars=['espresso:ESPRESSO', 'espresso-shared:ESPRESSO_SHARED'],
430430
support_distributions=['espresso:ESPRESSO_GRAALVM_SUPPORT'],
431431
library_configs=[espresso_library_config],
432-
polyglot_lib_jar_dependencies=['espresso:LIB_JAVAVM'],
433-
has_polyglot_lib_entrypoints=True,
434432
priority=1,
435433
stability=_espresso_stability,
436434
))

sdk/mx.sdk/mx_sdk_vm.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,10 @@ def __init__(self,
320320
self.third_party_license_files = third_party_license_files
321321
self.dependency_names = dependencies or []
322322
self.provided_executables = provided_executables or []
323-
self.polyglot_lib_build_args = polyglot_lib_build_args or []
324-
self.polyglot_lib_jar_dependencies = polyglot_lib_jar_dependencies or []
325-
self.polyglot_lib_build_dependencies = polyglot_lib_build_dependencies or []
326-
self.has_polyglot_lib_entrypoints = has_polyglot_lib_entrypoints
323+
self.polyglot_lib_build_args = []
324+
self.polyglot_lib_jar_dependencies = []
325+
self.polyglot_lib_build_dependencies = []
326+
self.has_polyglot_lib_entrypoints = False
327327
self.boot_jars = boot_jars or []
328328
self.jvmci_parent_jars = jvmci_parent_jars or []
329329
self.jar_distributions = jar_distributions or []
@@ -372,16 +372,11 @@ def __init__(self,
372372
assert isinstance(self.license_files, list)
373373
assert isinstance(self.third_party_license_files, list)
374374
assert isinstance(self.provided_executables, list)
375-
assert isinstance(self.polyglot_lib_build_args, list)
376-
assert isinstance(self.polyglot_lib_jar_dependencies, list)
377-
assert isinstance(self.polyglot_lib_build_dependencies, list)
378375
assert isinstance(self.boot_jars, list)
379376
assert isinstance(self.jvmci_parent_jars, list)
380377
assert isinstance(self.launcher_configs, list)
381378
assert isinstance(self.library_configs, list)
382379

383-
assert not any(cp_arg in self.polyglot_lib_build_args for cp_arg in ('-cp', '-classpath')), "the '{}' component passes a classpath argument to libpolylgot: '{}'. Use `polyglot_lib_jar_dependencies` instead".format(self.name, ' '.join(self.polyglot_lib_build_args))
384-
385380
def __str__(self):
386381
return "{} ({})".format(self.name, self.dir_name)
387382

@@ -1174,7 +1169,7 @@ def verify_graalvm_configs(suites=None, start_from=None, check_all=False):
11741169
"""
11751170
import mx_sdk_vm_impl
11761171
child_env = os.environ.copy()
1177-
for env_var in ['DYNAMIC_IMPORTS', 'DEFAULT_DYNAMIC_IMPORTS', 'COMPONENTS', 'EXCLUDE_COMPONENTS', 'SKIP_LIBRARIES', 'NATIVE_IMAGES', 'FORCE_BASH_LAUNCHERS', 'DISABLE_POLYGLOT', 'DISABLE_LIBPOLYGLOT']:
1172+
for env_var in ['DYNAMIC_IMPORTS', 'DEFAULT_DYNAMIC_IMPORTS', 'COMPONENTS', 'EXCLUDE_COMPONENTS', 'SKIP_LIBRARIES', 'NATIVE_IMAGES', 'FORCE_BASH_LAUNCHERS']:
11781173
if env_var in child_env:
11791174
del child_env[env_var]
11801175
started = start_from is None

sdk/mx.sdk/mx_sdk_vm_impl.py

Lines changed: 6 additions & 193 deletions
Large diffs are not rendered by default.

vm/README.md

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ The base GraalVM CE image includes:
3333
- Sulong
3434
- Graal.nodejs
3535
- Graal.js (imported as a dependency of `graal-nodejs`)
36-
- the `polyglot` launcher
37-
- the `libpolyglot` shared library
3836

3937
In our CI, we build it using:
4038
- the latest JVMCI-enabled JDK8 ([pre-built archives](https://github.com/graalvm/openjdk8-jvmci-builder/releases); [build instructions](https://github.com/graalvm/openjdk8-jvmci-builder)). The `JAVA_HOME` environment variable must point to it.
@@ -54,21 +52,19 @@ Which uses the settings in the env file in `mx.vm/ce`. Note that you can add cus
5452

5553
2.
5654
```bash
57-
$ mx --dynamicimports /substratevm,/tools,/sulong,/graal-nodejs --exclude-components=nju,nic,ni,nil,llp --force-bash-launchers=polyglot build
55+
$ mx --dynamicimports /substratevm,/tools,/sulong,/graal-nodejs --exclude-components=nju,nic,ni,nil,llp build
5856
```
5957

6058
3.
6159
```bash
6260
$ export DEFAULT_DYNAMIC_IMPORTS=/substratevm,/tools,/sulong,/graal-nodejs
6361
$ export EXCLUDE_COMPONENTS=nju,nic,ni,nil,llp
64-
$ export FORCE_BASH_LAUNCHERS=polyglot
6562
$ mx build
6663
```
6764
or:
6865
```bash
6966
$ export DYNAMIC_IMPORTS=/substratevm,/tools,/sulong,/graal-nodejs
7067
$ export EXCLUDE_COMPONENTS=nju,nic,ni,nil,llp
71-
$ export FORCE_BASH_LAUNCHERS=polyglot
7268
$ mx build
7369
```
7470
Note that the suites listed in:
@@ -88,41 +84,26 @@ creates:
8884

8985

9086
## Native images
91-
When `substratevm` is imported, the build system creates native launchers for the supported languages and for `polyglot`, plus the shared polyglot library (`libpolyglot`).
92-
Otherwise, it creates bash launchers for the languages and for `polyglot`, and does not create the shared polyglot library.
87+
When `substratevm` is imported, the build system creates native launchers for the supported languages.
88+
Otherwise, it creates bash launchers for the languages.
9389

9490
To override the default behavior, the `vm` suite defines the following `mx` arguments:
9591
```
96-
--native-images=... Comma-separated list of launchers and libraries (syntax: lib:polyglot) to build with Native Image.
97-
--disable-libpolyglot Disable the 'polyglot' library project
98-
--disable-polyglot Disable the 'polyglot' launcher project
92+
--native-images=... Comma-separated list of launchers and libraries (syntax: lib:jsvm) to build with Native Image.
9993
--force-bash-launchers=... Force the use of bash launchers instead of native images.
10094
This can be a comma-separated list of disabled launchers or `true` to disable all native launchers.
10195
```
10296
And the following environment variables:
10397
```
10498
NATIVE_IMAGES Same as '--native-images'
105-
DISABLE_LIBPOLYGLOT Same as '--disable-libpolyglot'
106-
DISABLE_POLYGLOT Same as '--disable-polyglot'
10799
FORCE_BASH_LAUNCHERS Same as '--force-bash-launchers'
108100
```
109101

110-
Note that when the shared polyglot library is not built, Graal.nodejs can only work in JVM-mode (`node --jvm [args]`).
111-
112-
113-
### Example: avoid building the polyglot image and the polyglot shared library
114-
115-
```bash
116-
$ mx --disable-polyglot --disable-libpolyglot --dynamicimports /substratevm,/tools,/sulong,/graal-js build
117-
```
118-
builds the native SubstrateVM launchers for native-image, Graal.js, and Sulong, but no polyglot launcher and polyglot library.
119-
120-
121102
### Example: force bash launchers
122103
```bash
123104
$ mx --force-bash-launchers=true --dynamicimports /substratevm,/tools,/sulong,/graal-nodejs build
124105
```
125-
builds the native SubstrateVM launcher for native-image, and creates bash launchers for Sulong, Graal.js, and `polyglot`
106+
builds the native SubstrateVM launcher for native-image, and creates bash launchers for Sulong and Graal.js
126107

127108
### Example: build only TruffleRuby with bash launchers
128109
```bash

vm/ci/ci_common/common.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ local devkits = graal_common.devkits;
557557
local sulong_vm_tests = graal_common.deps.svm + graal_common.deps.sulong + vm.custom_vm + self.vm_base('linux', 'amd64', 'gate') + {
558558
run: [
559559
['export', 'SVM_SUITE=' + vm.svm_suite],
560-
['mx', '--dynamicimports', '$SVM_SUITE,/sulong', '--disable-polyglot', '--disable-libpolyglot', 'gate', '--no-warning-as-error', '--tags', 'build,sulong'],
560+
['mx', '--dynamicimports', '$SVM_SUITE,/sulong', 'gate', '--no-warning-as-error', '--tags', 'build,sulong'],
561561
],
562562
timelimit: '1:00:00',
563563
name: 'gate-vm-native-sulong-' + self.jdk_name + '-linux-amd64',

vm/mx.vm/ce-espresso

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# mx --dy /espresso,/substratevm,/regex,/tools --components="Espresso libjvm,Espresso Standalone jvm.cfg,Java on Truffle,Truffle Macro,GraalVM license files,TRegex,suite:tools" --disable-libpolyglot --non-rebuildable-images=lib:javavm graalvm-show --print-env
1+
# mx --dy /espresso,/substratevm,/regex,/tools --components="Espresso libjvm,Espresso Standalone jvm.cfg,Java on Truffle,Truffle Macro,GraalVM license files,TRegex,suite:tools" --non-rebuildable-images=lib:javavm graalvm-show --print-env
22
DYNAMIC_IMPORTS=/espresso,/regex,/sdk,/substratevm,/tools,/truffle,/vm
33
COMPONENTS=cov,dap,ejc,ejvm,gvm,icu4j,ins,insight,insightheap,java,lsp,nfi,nfi-libffi,pro,rgx,sdk,sdkc,sdkl,sdkni,tfl,tfla,tflc,tflm,truffle-json
44
EXCLUDE_COMPONENTS=libpoly

vm/mx.vm/ce-llvm-espresso

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# mx --dy /espresso,/substratevm,/sulong,/regex,/tools --components="Espresso libjvm,Espresso Standalone jvm.cfg,Java on Truffle LLVM Java libraries,Java on Truffle,LLVM Runtime Native,LLVM.org toolchain,Truffle Macro,GraalVM license files,TRegex,suite:tools" --disable-libpolyglot --non-rebuildable-images=lib:javavm graalvm-show --print-env
1+
# mx --dy /espresso,/substratevm,/sulong,/regex,/tools --components="Espresso libjvm,Espresso Standalone jvm.cfg,Java on Truffle LLVM Java libraries,Java on Truffle,LLVM Runtime Native,LLVM.org toolchain,Truffle Macro,GraalVM license files,TRegex,suite:tools" --non-rebuildable-images=lib:javavm graalvm-show --print-env
22
DYNAMIC_IMPORTS=/espresso,/regex,/sdk,/substratevm,/sulong,/tools,/truffle,/vm
33
COMPONENTS=antlr4,cov,dap,ejc,ejvm,ellvm,gvm,icu4j,ins,insight,insightheap,java,llp,llrc,llrlf,llrn,lsp,nfi,nfi-libffi,pro,rgx,sdk,sdkc,sdkl,sdkni,tfl,tfla,tflc,tflm,truffle-json
44
EXCLUDE_COMPONENTS=libpoly

0 commit comments

Comments
 (0)