Skip to content

Commit 88c63f1

Browse files
farquetDSouzaM
authored andcommitted
Conditionally run on JAVA_HOME if --prebuilt-vm is passed to mx benchmark VM args
1 parent 72e4471 commit 88c63f1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sdk/mx.sdk/mx_sdk_benchmark.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ def post_process_command_line_args(self, args):
157157
return [arg if not callable(arg) else arg() for arg in self.extra_args] + args
158158

159159
def get_jdk(self):
160+
if self.run_on_java_home():
161+
# forcing the use of the default JAVA_HOME VM as runtime instead of the one pointed at by the tag
162+
return mx.get_jdk()
160163
tag = mx.get_jdk_option().tag
161164
if tag and tag != JVMCI_JDK_TAG:
162165
mx.abort("The '{0}/{1}' VM requires '--jdk={2}'".format(
@@ -254,7 +257,7 @@ def post_process_launcher_command_line_args(self, args):
254257
args
255258

256259
def home(self):
257-
if self.name() == 'native-image-java-home':
260+
if self.run_on_java_home() or self.name() == 'native-image-java-home':
258261
return mx.get_jdk().home
259262
return mx_sdk_vm_impl.graalvm_home(fatalIfMissing=True)
260263

0 commit comments

Comments
 (0)