Commit 9e4948d8 authored by Sergiy Belozorov's avatar Sergiy Belozorov Committed by Commit Bot

[tools] Add support for ref archive type

This will allow us to avoid packaging cctest into official archives, while still
keeeping them around for refbuilds. As a result, official archives will become a
lot smaller.

Corresponding recipe change: https://crrev.com/c/1517881

R=machenbach@chromium.org, tmrts@chromium.org

Bug: v8:8969
Change-Id: Icf67d2f6dd5dc4d4a4f32f9b5c5ef21758410546
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1517880
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60193}
parent e0d1acfe
......@@ -23,6 +23,12 @@ import sys
EXECUTABLE_FILES = [
'd8',
# TODO(sergiyb): Remove cctest from there after infra-side CL lands.
'cctest',
]
# Additional executable files added only to ref archive type.
REFBUILD_EXECUTABLE_FILES = [
'cctest',
]
......@@ -52,7 +58,7 @@ def main(argv):
help='Path to an output file. The files will '
'be stored in json list with absolute paths.')
parser.add_argument('-t', '--type',
choices=['all', 'exe', 'lib'], default='all',
choices=['all', 'exe', 'lib', 'ref'], default='all',
help='Specifies the archive type.')
args = parser.parse_args()
......@@ -61,8 +67,8 @@ def main(argv):
args.dir = os.path.abspath(args.dir)
# Skip libraries for exe archive type.
if args.type == 'exe':
# Skip libraries for exe and ref archive types.
if args.type in ('exe', 'ref'):
library_files = []
else:
library_files = LIBRARY_FILES[args.platform]
......@@ -73,6 +79,9 @@ def main(argv):
else:
executable_files = EXECUTABLE_FILES
if args.type == 'ref':
executable_files.extend(REFBUILD_EXECUTABLE_FILES)
list_of_files = []
def add_files_from_globs(globs):
list_of_files.extend(itertools.chain(*map(glob.iglob, globs)))
......
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