Commit ad8e36b0 authored by Eric Stevenson's avatar Eric Stevenson Committed by Commit Bot

Supersize: Remove duplicate method.

Change-Id: Iefb439e6437a8589599155097365d9dd9cb17bb3
Reviewed-on: https://chromium-review.googlesource.com/c/1349853
Commit-Queue: Eric Stevenson <estevenson@chromium.org>
Reviewed-by: default avatarSamuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611265}
parent ddc12b7e
...@@ -20,6 +20,11 @@ def IsThinArchive(path): ...@@ -20,6 +20,11 @@ def IsThinArchive(path):
def CreateThinObjectPath(archive_path, subpath): def CreateThinObjectPath(archive_path, subpath):
"""Given the .a path and .o subpath, returns the .o path.""" """Given the .a path and .o subpath, returns the .o path."""
# |subpath| is path complete under Gold, and incomplete under LLD. Check its
# prefix to test completeness, and if not, use |archive_path| to supply the
# required prefix.
if subpath.startswith('obj/'):
return subpath
# .o subpaths in thin archives are relative to the directory of the .a. # .o subpaths in thin archives are relative to the directory of the .a.
parent_path = os.path.dirname(archive_path) parent_path = os.path.dirname(archive_path)
return os.path.normpath(os.path.join(parent_path, subpath)) return os.path.normpath(os.path.join(parent_path, subpath))
...@@ -106,16 +111,6 @@ def ExpandThinArchives(paths, output_directory): ...@@ -106,16 +111,6 @@ def ExpandThinArchives(paths, output_directory):
return expanded_paths, thin_paths return expanded_paths, thin_paths
def CreateThinObjectPath(archive_path, subpath):
# |subpath| is path complete under Gold, and incomplete under LLD. Check its
# prefix to test completeness, and if not, use |archive_path| to supply the
# required prefix.
if subpath.startswith('obj/'):
return subpath
parent_path = os.path.dirname(archive_path)
return os.path.normpath(os.path.join(parent_path, subpath))
def main(): def main():
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('ar_path') parser.add_argument('ar_path')
......
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