@@ -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-
137112def 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
37603697def _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-
38123743def _expand_native_images_list (only ):
38133744 if isinstance (only , list ):
38143745 native_images = []
0 commit comments