Skip to content

Commit f2f105e

Browse files
committed
Merge remote-tracking branch 'origin/master' into master-rebranch
2 parents 6d6e347 + 9c6cf45 commit f2f105e

File tree

1 file changed

+18
-2
lines changed
  • utils/cmpcodesize/cmpcodesize

1 file changed

+18
-2
lines changed

utils/cmpcodesize/cmpcodesize/main.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,18 @@ def main():
107107
'other programs.',
108108
action='store_true',
109109
default=False)
110+
parser.add_argument('-o', '--old-build-directory',
111+
help='The directory containing the baseline objects ' +
112+
'against which to compare sizes.',
113+
action='store',
114+
dest='old_build_dir',
115+
default=None)
116+
parser.add_argument('-n', '--new-build-directory',
117+
help='The directory containing the new objects whose' +
118+
'sizes are to be compared against the baseline.',
119+
action='store',
120+
dest='new_build_dir',
121+
default=None)
110122

111123
# Positional arguments.
112124
# These can be specified in means beyond what argparse supports,
@@ -145,8 +157,12 @@ def main():
145157
else:
146158
old_file_args = parsed_arguments.files
147159

148-
old_build_dir = os.environ.get("SWIFT_OLD_BUILDDIR")
149-
new_build_dir = os.environ.get("SWIFT_NEW_BUILDDIR")
160+
old_build_dir = parsed_arguments.old_build_dir
161+
if not old_build_dir:
162+
old_build_dir = os.environ.get("SWIFT_OLD_BUILDDIR")
163+
new_build_dir = parsed_arguments.new_build_dir
164+
if not new_build_dir:
165+
new_build_dir = os.environ.get("SWIFT_NEW_BUILDDIR")
150166

151167
if not parsed_arguments.files:
152168
assert old_build_dir and new_build_dir, \

0 commit comments

Comments
 (0)