Reland "Reland: Update build rules to support ARCore"
This reverts commit 7bd37b662499dbe84ff0724b5002a7b656ef10ac. Reason for revert: this did not appear to be the culprit. Original change's description: > Revert "Reland: Update build rules to support ARCore" > > This reverts commit 14c289be60ab10ec9bdc0aa56fd38a55b3ee38c7. > > Reason for revert: > Speculative revert for APK merger failure on official 64 bit builders: > https://bugs.chromium.org/p/chromium/issues/detail?id=840342 > > Original change's description: > > Reland: Update build rules to support ARCore > > > > In this change, I've moved the code in chrome_public_apk_tmpl from the > > monochrome to he chrome template and ensured that apk_merger will pass. > > > > > Define enable_arcore and add some build rules to use it. > > > > > > Bug: 833511 > > > Change-Id: I716123c2a282d7d123883df81ebbc00a0a883be8 > > > Reviewed-on: https://chromium-review.googlesource.com/1033580 > > > Commit-Queue: Ian Vollick <vollick@chromium.org> > > > Reviewed-by: John Budorick <jbudorick@chromium.org> > > > Reviewed-by: Eric Stevenson <estevenson@chromium.org> > > > Reviewed-by: Yaron Friedman <yfriedman@chromium.org> > > > Reviewed-by: Michael Thiessen <mthiesse@chromium.org> > > > Reviewed-by: David Dorwin <ddorwin@chromium.org> > > > Cr-Commit-Position: refs/heads/master@{#555174} > > > > Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr > > Change-Id: I155d420f3b6606642cdfea43db48840f2c21a0cb > > Reviewed-on: https://chromium-review.googlesource.com/1040905 > > Reviewed-by: Tao Bai <michaelbai@chromium.org> > > Reviewed-by: Scott Violet <sky@chromium.org> > > Reviewed-by: Will Harris <wfh@chromium.org> > > Reviewed-by: Bill Orr <billorr@chromium.org> > > Reviewed-by: Eric Stevenson <estevenson@chromium.org> > > Reviewed-by: Richard Coles <torne@chromium.org> > > Reviewed-by: Yaron Friedman <yfriedman@chromium.org> > > Commit-Queue: Ian Vollick <vollick@chromium.org> > > Cr-Commit-Position: refs/heads/master@{#556200} > > TBR=vollick@chromium.org,sky@chromium.org,michaelbai@chromium.org,yfriedman@chromium.org,torne@chromium.org,wfh@chromium.org,estevenson@chromium.org,jbudorick@chromium.org,billorr@chromium.org > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Change-Id: I99a778b62c27506b820d36dfc90aafac3c88f553 > Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr > Reviewed-on: https://chromium-review.googlesource.com/1047945 > Reviewed-by: Ted Choc <tedchoc@chromium.org> > Commit-Queue: Ted Choc <tedchoc@chromium.org> > Cr-Commit-Position: refs/heads/master@{#556508} TBR=vollick@chromium.org,sky@chromium.org,michaelbai@chromium.org,yfriedman@chromium.org,torne@chromium.org,tedchoc@chromium.org,wfh@chromium.org,estevenson@chromium.org,jbudorick@chromium.org,billorr@chromium.org Change-Id: I8186226aa5be33b11f01fa7b751c41b3f94bb32f No-Presubmit: true No-Tree-Checks: true No-Try: true Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr Reviewed-on: https://chromium-review.googlesource.com/1049845 Reviewed-by: Ian Vollick <vollick@chromium.org> Commit-Queue: Ian Vollick <vollick@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#556764} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: cdb8e9984e33e2a59d3c5e80e8b80bc9a2ec7b5f
This commit is contained in:
Родитель
908c9f06a7
Коммит
ec33e00baf
|
@ -27,8 +27,11 @@ def main():
|
|||
parser.add_argument('apk', help='APK file path.')
|
||||
args = parser.parse_args()
|
||||
|
||||
#TODO(crbug.com/838414): add support for files included via loadable_modules.
|
||||
ignored_libs = ['libarcore_sdk_c_minimal.so']
|
||||
|
||||
si_count = resource_sizes.AnalyzeStaticInitializers(
|
||||
args.apk, args.tool_prefix, False, '.')
|
||||
args.apk, args.tool_prefix, False, '.', ignored_libs)
|
||||
if si_count != args.expected_count:
|
||||
print 'Expected {} static initializers, but found {}.'.format(
|
||||
args.expected_count, si_count)
|
||||
|
@ -40,7 +43,7 @@ def main():
|
|||
print 'Dumping static initializers via dump-static-initializers.py:'
|
||||
sys.stdout.flush()
|
||||
resource_sizes.AnalyzeStaticInitializers(
|
||||
args.apk, args.tool_prefix, True, '.')
|
||||
args.apk, args.tool_prefix, True, '.', ignored_libs)
|
||||
print
|
||||
print 'If the above list is not useful, consider listing them with:'
|
||||
print ' //tools/binary_size/diagnose_bloat.py'
|
||||
|
|
|
@ -562,12 +562,14 @@ def _AnnotatePakResources(out_dir):
|
|||
|
||||
|
||||
# This method also used by //build/android/gyp/assert_static_initializers.py
|
||||
def AnalyzeStaticInitializers(apk_filename, tool_prefix, dump_sis, out_dir):
|
||||
def AnalyzeStaticInitializers(apk_filename, tool_prefix, dump_sis, out_dir,
|
||||
ignored_libs):
|
||||
# Static initializer counting mostly copies logic in
|
||||
# infra/scripts/legacy/scripts/slave/chromium/sizes.py.
|
||||
with zipfile.ZipFile(apk_filename) as z:
|
||||
so_files = [f for f in z.infolist()
|
||||
if f.filename.endswith('.so') and f.file_size > 0]
|
||||
if f.filename.endswith('.so') and f.file_size > 0
|
||||
and os.path.basename(f.filename) not in ignored_libs]
|
||||
# Skip checking static initializers for 32 bit .so files when 64 bit .so files
|
||||
# are present since the 32 bit versions will be checked by bots that only
|
||||
# build the 32 bit version. This avoids the complexity of finding 32 bit .so
|
||||
|
@ -703,6 +705,9 @@ def main():
|
|||
dest='dump_sis',
|
||||
help='Run dump-static-initializers.py to get the list'
|
||||
'of static initializers (slow).')
|
||||
argparser.add_argument('--loadable_module',
|
||||
action='append',
|
||||
help='Use for libraries added via loadable_modules')
|
||||
argparser.add_argument('--estimate-patch-size',
|
||||
action='store_true',
|
||||
help='Include patch size estimates. Useful for perf '
|
||||
|
@ -730,8 +735,10 @@ def main():
|
|||
PrintApkAnalysis(args.apk, tool_prefix, out_dir, chartjson=chartjson)
|
||||
_PrintDexAnalysis(args.apk, chartjson=chartjson)
|
||||
|
||||
ignored_libs = args.loadable_module if args.loadable_module else []
|
||||
|
||||
si_count = AnalyzeStaticInitializers(
|
||||
args.apk, tool_prefix, args.dump_sis, out_dir)
|
||||
args.apk, tool_prefix, args.dump_sis, out_dir, ignored_libs)
|
||||
perf_tests_results_helper.ReportPerfResult(
|
||||
chartjson, 'StaticInitializersCount', 'count', si_count, 'count')
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче