Revert "[build] Add filter script for official build"
This reverts commit 54b42a55e7
.
Reason for revert: Fails on native arm builders.
Original change's description:
> [build] Add filter script for official build
>
> This adds a V8-side script to list the files contained in an official archive.
>
> This'll accompany the infra-side archive recipe:
> https://chromium-review.googlesource.com/c/544298/
>
> Keeping this script on the V8-side will make it easy to change the
> archived build product.
>
> NOTRY=true
>
> Bug: v8:5918
> Change-Id: I9fcb2eae183a26e7ce11c839d95a583a049cbe75
> Reviewed-on: https://chromium-review.googlesource.com/544877
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46135}
TBR=machenbach@chromium.org,vogelheim@chromium.org,tandrii@chromium.org,jochen@chromium.org
Change-Id: Ic3bb59b5f0864941c8f8b590b0a351c103988f93
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:5918
Reviewed-on: https://chromium-review.googlesource.com/544978
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46137}
This commit is contained in:
parent
ccbda5111e
commit
d599de6565
10
BUILD.gn
10
BUILD.gn
@ -2774,16 +2774,6 @@ group("v8_clusterfuzz") {
|
||||
}
|
||||
}
|
||||
|
||||
group("v8_archive") {
|
||||
deps = [
|
||||
":d8",
|
||||
":v8_hello_world",
|
||||
":v8_parser_shell",
|
||||
":v8_sample_process",
|
||||
":v8_shell",
|
||||
]
|
||||
}
|
||||
|
||||
group("v8_fuzzers") {
|
||||
testonly = true
|
||||
deps = [
|
||||
|
@ -1,79 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright 2017 the V8 project authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
"""
|
||||
Enumerates relevant build files for each platform.
|
||||
|
||||
This can be used to filter the build directory before making an official
|
||||
archive. The archive should only contain files required for running or
|
||||
static linking, e.g. executables, startup files, libraries.
|
||||
|
||||
The script is limited to release builds and assumes GN.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import glob
|
||||
import itertools
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
EXECUTABLES = [
|
||||
'd8',
|
||||
'v8_hello_world',
|
||||
'v8_parser_shell',
|
||||
'v8_sample_process',
|
||||
'v8_shell',
|
||||
]
|
||||
|
||||
SUPPLEMENTARY_FILES = [
|
||||
'icudtl.dat',
|
||||
'natives_blob.bin',
|
||||
'snapshot_blob.bin',
|
||||
'v8_build_config.json',
|
||||
]
|
||||
|
||||
LIBS = {
|
||||
'linux': ['*.a', '*.so', 'obj/*.a', 'obj/*.so'],
|
||||
'mac': ['*.a', '*.so', 'obj/*.a', 'obj/*.so'],
|
||||
'win': ['*.lib', '*.dll', 'obj\\*.a', 'obj\\*.so'],
|
||||
}
|
||||
|
||||
|
||||
def main(argv):
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
|
||||
parser.add_argument('-d', '--dir', required=True,
|
||||
help='Path to the build directory.')
|
||||
parser.add_argument('-p', '--platform', required=True,
|
||||
help='Target platform name: win|mac|linux.')
|
||||
parser.add_argument('-o', '--json-output', required=True,
|
||||
help='Path to an output file. The files will '
|
||||
'be stored in json list with absolute paths.')
|
||||
args = parser.parse_args()
|
||||
|
||||
if not os.path.isdir(args.dir):
|
||||
parser.error('%s is not an existing directory.' % args.dir)
|
||||
|
||||
args.dir = os.path.abspath(args.dir)
|
||||
|
||||
extended_executables = [
|
||||
f + '.exe' if args.platform == 'win' else f
|
||||
for f in EXECUTABLES]
|
||||
|
||||
all_globs = [
|
||||
os.path.join(args.dir, f)
|
||||
for f in extended_executables + SUPPLEMENTARY_FILES + LIBS[args.platform]
|
||||
]
|
||||
|
||||
with open(args.json_output, 'w') as f:
|
||||
json.dump(list(itertools.chain(*map(glob.iglob, all_globs))), f)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv))
|
Loading…
Reference in New Issue
Block a user