File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -272,7 +272,7 @@ def libpythonvm_build_args():
272272 build_args += bytecode_dsl_build_args ()
273273 if mx_sdk_vm_ng .is_nativeimage_ee () and mx .get_os () == 'linux' and 'NATIVE_IMAGE_AUXILIARY_ENGINE_CACHE' not in os .environ :
274274 build_args += ['--gc=G1' , '-H:-ProtectionKeys' ]
275- if not os .environ .get ("GRAALPY_PGO_PROFILE" ) and mx .suite ('graalpython-enterprise' , fatalIfMissing = False ):
275+ if not os .environ .get ("GRAALPY_PGO_PROFILE" ) and mx .suite ('graalpython-enterprise' , fatalIfMissing = False ) and mx_sdk_vm_ng . get_bootstrap_graalvm_version () >= mx . VersionSpec ( "25.0" ) :
276276 cmd = mx .command_function ('python-get-latest-profile' , fatalIfMissing = False )
277277 if cmd :
278278 profile = None
@@ -299,6 +299,9 @@ def graalpy_native_pgo_build_and_test(_):
299299 then builds a PGO-optimized GraalPy native standalone with the collected profile.
300300 The profile file will be named 'default.iprof' in native image build directory.
301301 """
302+ if mx_sdk_vm_ng .get_bootstrap_graalvm_version () < mx .VersionSpec ("25.0" ):
303+ mx .abort ("python-native-pgo not supported on GraalVM < 25" )
304+
302305 with set_env (GRAALPY_PGO_PROFILE = "" ):
303306 mx .log (mx .colorize ("[PGO] Building PGO-instrumented native image" , color = "yellow" ))
304307 build_home = graalpy_standalone_home ('native' , enterprise = True , build = True )
You can’t perform that action at this time.
0 commit comments