Skip to content

Commit

Permalink
[GR-704] Remove --vm and --vmbuild mx flags
Browse files Browse the repository at this point in the history
PullRequest: mx/1794
  • Loading branch information
patrick96 committed May 13, 2024
2 parents 312009d + d4efd4b commit 9bf0341
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 28 deletions.
2 changes: 1 addition & 1 deletion ci/common.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ local common_json = import "../common.json";
# Keep in sync with com.oracle.svm.hosted.NativeImageOptions#DEFAULT_ERROR_FILE_NAME
" (?P<filename>.+/svm_err_b_\\d+T\\d+\\.\\d+_pid\\d+\\.md)",
# Keep in sync with jdk.graal.compiler.test.SubprocessUtil#makeArgfile
" @(?P<filename>.*SubprocessUtil.*\\.argfile)",
"@(?P<filename>.*SubprocessUtil-argfiles.*\\.argfile)",
],
},

Expand Down
16 changes: 8 additions & 8 deletions common.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
"jdks": {
"galahad-jdk": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+16-1220", "platformspecific": true, "extrabundles": ["static-libs"]},
"galahad-jdk": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+20-1618", "platformspecific": true, "extrabundles": ["static-libs"]},

"oraclejdk11": {"name": "jpg-jdk", "version": "11.0.11", "build_id": "jdk-11.0.11+9", "platformspecific": true, "extrabundles": ["static-libs"] },

Expand Down Expand Up @@ -44,13 +44,13 @@
"labsjdk-ee-21Debug": {"name": "labsjdk", "version": "ee-21.0.2+13-jvmci-23.1-b33-debug", "platformspecific": true },
"labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21.0.2+13-jvmci-23.1-b33-sulong", "platformspecific": true },

"oraclejdk-latest": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+18", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-23+18-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-23+18-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-23+18-jvmci-b01-sulong", "platformspecific": true },
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-23+18-jvmci-b01", "platformspecific": true },
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-23+18-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-23+18-jvmci-b01-sulong", "platformspecific": true }
"oraclejdk-latest": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+21", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-23+21-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-23+21-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-23+21-jvmci-b01-sulong", "platformspecific": true },
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-23+21-jvmci-b01", "platformspecific": true },
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-23+21-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-23+21-jvmci-b01-sulong", "platformspecific": true }
},

"eclipse": {
Expand Down
10 changes: 1 addition & 9 deletions src/mx/_impl/mx.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,11 +877,6 @@ def _parse_cmd_line(self, opts, firstParse):
parser = ArgParser(parents=[self])
parser.add_argument('initialCommandAndArgs', nargs=REMAINDER, metavar='command args...')

# Legacy support - these options are recognized during first parse and
# appended to the unknown options to be reparsed in the second parse
parser.add_argument('--vm', action='store', dest='vm', help='the VM type to build/run')
parser.add_argument('--vmbuild', action='store', dest='vmbuild', help='the VM build to build/run')

# Parse the known mx global options and preserve the unknown args, command and
# command args for the second parse.
_, self.unknown = parser.parse_known_args(namespace=opts)
Expand All @@ -893,9 +888,6 @@ def _parse_cmd_line(self, opts, firstParse):
print('mx version ' + str(version))
sys.exit(0)

if opts.vm: self.unknown += ['--vm=' + opts.vm]
if opts.vmbuild: self.unknown += ['--vmbuild=' + opts.vmbuild]

self.initialCommandAndArgs = opts.__dict__.pop('initialCommandAndArgs')

# For some reason, argparse considers an unknown argument starting with '-'
Expand Down Expand Up @@ -18181,7 +18173,7 @@ def alarm_handler(signum, frame):
_CACHE_DIR = get_env('MX_CACHE_DIR', join(dot_mx_dir(), 'cache'))

# The version must be updated for every PR (checked in CI) and the comment should reflect the PR's issue
version = VersionSpec("7.25.2") # GR-53991
version = VersionSpec("7.25.3") # GR-704 Remove --vm and --vmbuild flags

_mx_start_datetime = datetime.utcnow()

Expand Down
13 changes: 3 additions & 10 deletions src/mx/_impl/mx_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -1788,14 +1788,7 @@ class JavaVm(Vm):
pass


def _get_default_java_vm(jvm_config, vms):
if mx.get_opts().vm is not None and (jvm_config is None or (mx.get_opts().vm, jvm_config) in vms):
mx.warn("Defaulting --jvm to the deprecated --vm value. Please use --jvm.")
return mx.get_opts().vm
return None


java_vm_registry = VmRegistry("Java", "jvm", _get_default_java_vm)
java_vm_registry = VmRegistry("Java", "jvm")
js_vm_registry = VmRegistry("JavaScript", "js", known_host_registries=[java_vm_registry])


Expand Down Expand Up @@ -1868,7 +1861,7 @@ def __init__(self):
def extract_vm_info(self, args=None):
if args is None:
# This method will force the caller to pass 'args' in the future to ensure correctness of the output
mx.log_deprecation("Downstream suite must pass the VM arguments to ensure valid VM info extraction !")
log_deprecation("Downstream suite must pass the VM arguments to ensure valid VM info extraction !")
args = []
args = self.post_process_command_line_args(args)
args_str = ' '.join(args)
Expand Down Expand Up @@ -2596,7 +2589,7 @@ def jmhBenchmarkFilter(self, bmSuiteArgs):
jmh_benchmarks = self.jmhArgs(bmSuiteArgs).jmh_benchmarks
if not jmh_benchmarks:
return []
mx.log_deprecation("The --jmh-benchmarks flag is deprecated, please list the benchmarks to run as JMH parameters (after the last '--').")
log_deprecation("The --jmh-benchmarks flag is deprecated, please list the benchmarks to run as JMH parameters (after the last '--').")
return jmh_benchmarks.split(',')

def jmhJAR(self, bmSuiteArgs):
Expand Down

0 comments on commit 9bf0341

Please sign in to comment.