Commit 943643dd authored by Tomasz Śniatowski's avatar Tomasz Śniatowski Committed by Commit Bot

Fix proguard.py depfile issue with --applymapping

Don't add a string to a list, as that creates a broken depfile with
"deps" of single-character paths. Also while there make the depfile
preserve the relative path passed in -- use abspath when it's needed
instead of ahead of time.

Change-Id: Ib61efc68dfc9ecfaac7f3dcb6007bafb9fb8af67
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1811252Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Commit-Queue: Tomasz Śniatowski <tsniatowski@vewd.com>
Cr-Commit-Position: refs/heads/master@{#697731}
parent 7002168e
......@@ -135,9 +135,6 @@ def _ParseOptions():
options.extra_mapping_output_paths = build_utils.ParseGnList(
options.extra_mapping_output_paths)
if options.apply_mapping:
options.apply_mapping = os.path.abspath(options.apply_mapping)
return options
......@@ -331,7 +328,7 @@ def _CreateDynamicConfig(options):
}""" % options.min_api)
if options.apply_mapping:
ret.append("-applymapping '%s'" % options.apply_mapping)
ret.append("-applymapping '%s'" % os.path.abspath(options.apply_mapping))
if options.repackage_classes:
ret.append("-repackageclasses '%s'" % options.repackage_classes)
......@@ -413,7 +410,7 @@ def main():
inputs = options.proguard_configs + options.input_paths + libraries
if options.apply_mapping:
inputs += options.apply_mapping
inputs.append(options.apply_mapping)
build_utils.WriteDepfile(
options.depfile, options.output_path, inputs=inputs, add_pydeps=False)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment