@@ -1986,47 +1986,6 @@ def getArchivableResults(self, use_relpath=True, single=False):
1986
1986
def is_skipped (self ):
1987
1987
return _skip_libraries (self .native_image_config )
1988
1988
1989
- class PolyglotIsolateLibrary (GraalVmLibrary ):
1990
- """
1991
- A native image project dedicated to constructing a language polyglot isolate library.
1992
- Despite being built upon the component supertype, it operates independently of the component system
1993
- and native-image macros. Its configuration relies solely on the module path and META-INF/native-image
1994
- configuration files. Instances are instantiated by mx_truffle::register_polyglot_isolate_distributions
1995
- when a language dynamically registers a polyglot isolate distribution.
1996
- """
1997
- def __init__ (self , target_suite , language , deps , build_args , ** kw_args ):
1998
- library_config = mx_sdk .LanguageLibraryConfig (
1999
- jar_distributions = deps ,
2000
- build_args = [],
2001
- build_args_enterprise = build_args ,
2002
- language = language ,
2003
- )
2004
- super (PolyglotIsolateLibrary , self ).__init__ (None , f'{ language } .isolate.image' ,
2005
- list (deps ), library_config , ** kw_args )
2006
- self .suite = target_suite
2007
- self .dir = target_suite .dir
2008
-
2009
-
2010
- def getBuildTask (self , args ):
2011
- svm_support = _get_svm_support ()
2012
- assert svm_support .is_supported (), "Needs svm to build " + str (self )
2013
- if not self .is_skipped ():
2014
- return PolyglotIsolateLibraryBuildTask (self , args , svm_support )
2015
- else :
2016
- return mx .NoOpTask (self , args )
2017
-
2018
- def getArchivableResults (self , use_relpath = True , single = False ):
2019
- for e in super (PolyglotIsolateLibrary , self ).getArchivableResults (use_relpath = use_relpath , single = single ):
2020
- yield e
2021
- if single :
2022
- return
2023
- output_dir = dirname (self .output_file ())
2024
- resources_dir = join (output_dir , 'resources' )
2025
- if exists (resources_dir ):
2026
- yield resources_dir , 'resources'
2027
-
2028
- def is_skipped (self ):
2029
- return False
2030
1989
2031
1990
class GraalVmMiscLauncher (GraalVmLauncher ): # pylint: disable=too-many-ancestors
2032
1991
def __init__ (self , component , native_image_config , stage1 = False , ** kw_args ):
@@ -2481,33 +2440,6 @@ class GraalVmLibraryBuildTask(GraalVmSVMNativeImageBuildTask):
2481
2440
pass
2482
2441
2483
2442
2484
- class PolyglotIsolateLibraryBuildTask (GraalVmLibraryBuildTask ):
2485
- """
2486
- A PolyglotIsolateLibrary build task building a language polyglot isolate library.
2487
- Despite being built upon the component supertype, it operates independently of the component system
2488
- and native-image macros. Its configuration relies solely on the module path and META-INF/native-image
2489
- configuration files.
2490
- """
2491
- def get_build_args (self ):
2492
- project = self .subject
2493
- target = project .native_image_name [:- len (_lib_suffix )]
2494
- build_args = [
2495
- '-EJVMCI_VERSION_CHECK' , # Propagate this env var when running native image from mx
2496
- '--parallelism=' + str (self .parallelism ),
2497
- '--shared' ,
2498
- '-o' ,
2499
- target ,
2500
- '--features=com.oracle.svm.enterprise.truffle.PolyglotIsolateGuestFeature' ,
2501
- '-H:APIFunctionPrefix=truffle_isolate_' ,
2502
- ] + svm_experimental_options ([
2503
- '-H:+IgnoreMaxHeapSizeWhileInVMOperation' ,
2504
- '-H:+CopyLanguageResources' ,
2505
- '-H:+GenerateBuildArtifactsFile' , # generate 'build-artifacts.json'
2506
- ]) + mx .get_runtime_jvm_args (self .subject .native_image_jar_distributions ) + \
2507
- project .native_image_config .build_args + project .native_image_config .build_args_enterprise
2508
- return build_args
2509
-
2510
-
2511
2443
class JmodModifier (mx .Project ):
2512
2444
def __init__ (self , jmod_file , library_projects , jimage_project , ** kw_args ):
2513
2445
"""
0 commit comments