@@ -201,12 +201,14 @@ def __init__(self, destination, jar_distributions, main_class, build_args, langu
201
201
202
202
203
203
class LibraryConfig (AbstractNativeImageConfig ):
204
- def __init__ (self , destination , jar_distributions , build_args , jvm_library = False , use_modules = None , home_finder = False , ** kwargs ):
204
+ def __init__ (self , destination , jar_distributions , build_args , jvm_library = False , use_modules = None , add_to_module = None , home_finder = False , ** kwargs ):
205
205
"""
206
206
:param bool jvm_library
207
+ :param str add_to_module: the simple name of a module that should be modified to include this native library. It must not be a path or end with `.jmod`
207
208
"""
208
209
super (LibraryConfig , self ).__init__ (destination , jar_distributions , build_args , use_modules = use_modules , home_finder = home_finder , ** kwargs )
209
210
self .jvm_library = jvm_library
211
+ self .add_to_module = add_to_module
210
212
211
213
212
214
class LanguageLibraryConfig (LibraryConfig ):
@@ -422,15 +424,12 @@ class GraalVmJreComponent(GraalVmComponent):
422
424
423
425
424
426
class GraalVmJvmciComponent (GraalVmJreComponent ):
425
- def __init__ (self , suite , name , short_name , license_files , third_party_license_files , jvmci_jars ,
426
- graal_compiler = None , ** kwargs ):
427
+ def __init__ (self , suite , name , short_name , license_files , third_party_license_files , jvmci_jars , ** kwargs ):
427
428
"""
428
429
:type jvmci_jars: list[str]
429
- :type graal_compiler: str
430
430
"""
431
431
super (GraalVmJvmciComponent , self ).__init__ (suite , name , short_name , license_files , third_party_license_files ,
432
432
** kwargs )
433
- self .graal_compiler = graal_compiler
434
433
self .jvmci_jars = jvmci_jars or []
435
434
436
435
assert isinstance (self .jvmci_jars , list )
@@ -611,12 +610,6 @@ def jlink_has_save_jlink_argfiles(jdk):
611
610
"""
612
611
return _probe_jlink_info (jdk , '.supports_save_jlink_argfiles' )
613
612
614
- def jlink_has_copy_files (jdk ):
615
- """
616
- Determines if the jlink executable in `jdk` supports ``--copy-files``.
617
- """
618
- return _probe_jlink_info (jdk , '.supports_copy_files' )
619
-
620
613
def _jdk_omits_warning_for_jlink_set_ThreadPriorityPolicy (jdk ): # pylint: disable=invalid-name
621
614
"""
622
615
Determines if the `jdk` suppresses a warning about ThreadPriorityPolicy when it
@@ -972,17 +965,6 @@ def jlink_new_jdk(jdk, dst_jdk_dir, module_dists, ignore_dists,
972
965
jlink .append ('--add-modules=' + ',' .join (_get_image_root_modules (root_module_names , module_names , jdk_modules .keys (), use_upgrade_module_path )))
973
966
jlink_persist .append ('--add-modules=jdk.internal.vm.ci' )
974
967
975
- if jlink_has_copy_files (jdk ):
976
- import mx_sdk_vm_impl
977
- libgraal_component = mx_sdk_vm_impl ._get_libgraal_component ()
978
- if libgraal_component is not None :
979
- # Only bake --copy-files into the args of <dst_jdk_dir>/bin/jlink
980
- # if libgraal will be in <dst_jdk_dir>/lib
981
- libgraal = f'lib/{ mx .add_lib_suffix (mx .add_lib_prefix ("jvmcicompiler" ))} '
982
- if mx .get_os () == 'windows' :
983
- libgraal = libgraal .replace ('lib/' , 'bin/' )
984
- jlink_persist .append (f'--copy-files={ libgraal } ' )
985
-
986
968
module_path = patched_java_base + os .pathsep + jmods_dir
987
969
if modules and not use_upgrade_module_path :
988
970
module_path = os .pathsep .join ((m .get_jmod_path (respect_stripping = True ) for m in modules )) + os .pathsep + module_path
0 commit comments