@@ -381,6 +381,8 @@ def __init__(self, vm: NativeImageVM, bm_suite: BenchmarkSuite | NativeImageBenc
381381
382382 if vm .is_quickbuild :
383383 base_image_build_args += ['-Ob' ]
384+ if vm .graalos :
385+ base_image_build_args += ['-H:+GraalOS' ]
384386 if vm .use_string_inlining :
385387 base_image_build_args += ['-H:+UseStringInlining' ]
386388 if vm .use_open_type_world :
@@ -716,6 +718,7 @@ def __init__(self, name, config_name, extra_java_args=None, extra_launcher_args=
716718 self .is_gate = False
717719 self .is_quickbuild = False
718720 self .layered = False
721+ self .graalos = False
719722 self .use_string_inlining = False
720723 self .is_llvm = False
721724 self .gc = None
@@ -780,6 +783,8 @@ def config_name(self):
780783 config += ["quickbuild" ]
781784 if self .layered is True :
782785 config += ["layered" ]
786+ if self .graalos is True :
787+ config += ["graalos" ]
783788 if self .gc == "G1" :
784789 config += ["g1gc" ]
785790 if self .is_llvm is True :
@@ -839,7 +844,7 @@ def _configure_from_name(self, config_name):
839844 # This defines the allowed config names for NativeImageVM. The ones registered will be available via --jvm-config
840845 # Note: the order of entries here must match the order of statements in NativeImageVM.config_name()
841846 rule = r'^(?P<native_architecture>native-architecture-)?(?P<string_inlining>string-inlining-)?(?P<otw>otw-)?(?P<compacting_gc>compacting-gc-)?(?P<preserve_all>preserve-all-)?(?P<preserve_classpath>preserve-classpath-)?' \
842- r'(?P<future_defaults_all>future-defaults-all-)?(?P<gate>gate-)?(?P<upx>upx-)?(?P<quickbuild>quickbuild-)?(?P<layered>layered-)?(?P<gc>g1gc-)?' \
847+ r'(?P<future_defaults_all>future-defaults-all-)?(?P<gate>gate-)?(?P<upx>upx-)?(?P<quickbuild>quickbuild-)?(?P<layered>layered-)?(?P<graalos>graalos-)?(?P< gc>g1gc-)?' \
843848 r'(?P<llvm>llvm-)?(?P<pgo>pgo-|pgo-sampler-)?(?P<inliner>inline-)?' \
844849 r'(?P<analysis_context_sensitivity>insens-|allocsens-|1obj-|2obj1h-|3obj2h-|4obj3h-)?(?P<jdk_profiles>jdk-profiles-collect-|adopted-jdk-pgo-)?' \
845850 r'(?P<profile_inference>profile-inference-feature-extraction-|profile-inference-pgo-|profile-inference-debug-)?(?P<sampler>safepoint-sampler-|async-sampler-)?(?P<optimization_level>O0-|O1-|O2-|O3-|Os-)?(default-)?(?P<edition>ce-|ee-)?$'
@@ -894,6 +899,10 @@ def _configure_from_name(self, config_name):
894899 mx .logv (f"'layered' is enabled for { config_name } " )
895900 self .layered = True
896901
902+ if matching .group ("graalos" ) is not None :
903+ mx .logv (f"'graalos' is enabled for { config_name } " )
904+ self .graalos = True
905+
897906 if matching .group ("gc" ) is not None :
898907 gc = matching .group ("gc" )[:- 1 ]
899908 if gc == "g1gc" :
0 commit comments