Skip to content

Commit

Permalink
[GR-48944] Improve handling and propagation of the strip jars argument.
Browse files Browse the repository at this point in the history
PullRequest: mx/1682
  • Loading branch information
ansalond committed Oct 9, 2023
2 parents dfef780 + 768b3a2 commit 7c5d6ca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions ci/common.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,11 @@ local common_json = import "../common.json";
labsjdk20ce: self["labsjdk-ce-20"],
labsjdk20ee: self["labsjdk-ee-20"],

labsjdkLatestCE: self["labsjdk-ce-21"],
labsjdkLatestEE: self["labsjdk-ee-21"],
labsjdk21ce: self["labsjdk-ce-21"],
labsjdk21ee: self["labsjdk-ee-21"],

labsjdkLatestCE: self["labsjdk-ce-latest"],
labsjdkLatestEE: self["labsjdk-ee-latest"],

oraclejdkLatest: self["oraclejdk-latest"],
},
Expand Down
6 changes: 4 additions & 2 deletions mx.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ def __init__(self, parents=None):
self.add_argument('--version-conflict-resolution', dest='version_conflict_resolution', action='store', help='resolution mechanism used when a suite is imported with different versions', default='suite', choices=['suite', 'none', 'latest', 'latest_all', 'ignore'])
self.add_argument('-c', '--max-cpus', action='store', type=int, dest='cpu_count', help='the maximum number of cpus to use during build', metavar='<cpus>', default=None)
self.add_argument('--proguard-cp', action='store', help='class path containing ProGuard jars to be used instead of default versions')
self.add_argument('--strip-jars', action='store_true', help='produce and use stripped jars in all mx commands.')
self.add_argument('--strip-jars', action='store_true', default=env_var_to_bool('MX_STRIP_JARS'), help='produce and use stripped jars in all mx commands.')
self.add_argument('--env', dest='additional_env', help='load an additional env file in the mx dir of the primary suite', metavar='<name>')
self.add_argument('--trust-http', action='store_true', help='Suppress warning about downloading from non-https sources')
self.add_argument('--multiarch', action='store_true', help='enable all architectures of native multiarch projects (not just the host architecture)')
Expand Down Expand Up @@ -13719,6 +13719,8 @@ def run_mx(args, suite=None, mxpy=None, nonZeroIsFatal=True, out=None, err=None,
commands.append('-V')
else:
commands.append('-v')
if get_opts().strip_jars:
commands.append('--strip-jars')
if _opts.version_conflict_resolution != 'suite':
commands += ['--version-conflict-resolution', _opts.version_conflict_resolution]
return run(commands + args, nonZeroIsFatal=nonZeroIsFatal, out=out, err=err, timeout=timeout, env=env, cwd=cwd)
Expand Down Expand Up @@ -18831,7 +18833,7 @@ def alarm_handler(signum, frame):
abort(1, killsig=signal.SIGINT)

# The version must be updated for every PR (checked in CI) and the comment should reflect the PR's issue
version = VersionSpec("6.51.1") # GR-47806 Code owners: fix toml module use
version = VersionSpec("6.51.2") # GR-48944: strip jars

_mx_start_datetime = datetime.utcnow()
_last_timestamp = _mx_start_datetime
Expand Down

0 comments on commit 7c5d6ca

Please sign in to comment.