[SuperSize] Clean up SuperSize-archive arguments for "main input".
SuperSize-archive takes a "main input" file parameter. Ideally it is given and is unique. However, the following complicate things: (1) --map-file can be a main input as well as an auxiliary input for another main input. (2) integration_test.py often specifies an ELF file alongside, e.g., an APK file, to represent an extracted ELF file. (3) --ssargs-file a valid "main input" only at command line, and cannot be nested within an .ssargs file. (4) -f identifies main input file, and can be used in .ssargs files. This CL cleans up main input processing and address the above. Details: * Renamed _ParseSsargs() to ParseSsargs() for upcoming use. * Move more checking logic there. * For (1): Resolve exclusion with custom logic in _GetMainFiles() and error handling in _DeduceDerivedArgsAndCheckMainInput(), which was _DeduceDerivedArgs(). * For (2): Add new parameter --aux-elf-file and update tests to use it. Did NOT add --aux-map-file due to low usage. * For (3) and (4): Simplify code by allowing --ssargs-file (and -f with .ssargs) in argparse, and have a single check to reject this in ParseSsargs(). Bug: 1040645 Change-Id: I28e510747b43f3ebcc9dcd9c53006913c97f02dd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2263012 Commit-Queue: Samuel Huang <huangs@chromium.org> Reviewed-by:Andrew Grieve <agrieve@chromium.org> Cr-Commit-Position: refs/heads/master@{#781871}
Showing
This diff is collapsed.
Please register or sign in to comment