Skip to content

Commit 205b056

Browse files
Reverts "[Fuchsia] Use more high level fuchsia-gn-sdk templates (flutter#55445)" (flutter/engine#55834)
Reverts: flutter/engine#55445 Initiated by: zijiehe-google-com Reason for reverting: This change would break the build_fuchsia_artifacts.py without https://github.com/flutter/engine/pull/55832/files. I'd merge two into one. Original PR Author: zijiehe-google-com Reviewed By: {jrwang} This change reverts the following previous change: This change removes the in-house built pm-based build rules in favor of the high level fuchsia_component / fuchsia_package in the gn-sdk. The build_fuchsia_artifacts.py is still using pm, and it will be handled in a following change. Bug: http://b/353729557, http://b/368608542 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
1 parent 225aa6d commit 205b056

File tree

5 files changed

+348
-99
lines changed

5 files changed

+348
-99
lines changed

engine/src/flutter/shell/platform/fuchsia/dart_runner/BUILD.gn

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ template("aot_runner_package") {
190190
"//flutter/shell/platform/fuchsia/runtime/dart/profiler_symbols:dart_aot_runner",
191191
"target_gen_dir") + "/dart_aot_runner.dartprofilersymbols")
192192

193+
inputs = [
194+
vmservice_snapshot,
195+
observatory_archive_file,
196+
dart_profiler_symbols,
197+
]
198+
193199
resources += [
194200
{
195201
path = vmservice_snapshot

engine/src/flutter/tools/fuchsia/build_fuchsia_artifacts.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,6 @@ def CopyZirconFFILibIfExists(source, destination):
146146
FindFileAndCopyTo('libzircon_ffi.so', source_root, destination_base)
147147

148148

149-
# TODO(zijiehe): http://crbug.com/368608542, avoid using pm or building far
150-
# packages here, packages should be built by ninja.
151149
def CopyToBucketWithMode(source, destination, aot, product, runner_type, api_level):
152150
mode = 'aot' if aot else 'jit'
153151
product_suff = '_product' if product else ''
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#!/usr/bin/env python3
2+
#
3+
# Copyright 2013 The Flutter Authors. All rights reserved.
4+
# Use of this source code is governed by a BSD-style license that can be
5+
# found in the LICENSE file.
6+
7+
""" Copies paths, creates if they do not exist.
8+
"""
9+
10+
import argparse
11+
import errno
12+
import json
13+
import os
14+
import platform
15+
import shutil
16+
import subprocess
17+
import sys
18+
19+
20+
def EnsureParentExists(path):
21+
dir_name, _ = os.path.split(path)
22+
if not os.path.exists(dir_name):
23+
os.makedirs(dir_name)
24+
25+
26+
def SameStat(s1, s2):
27+
return s1.st_ino == s2.st_ino and s1.st_dev == s2.st_dev
28+
29+
30+
def SameFile(f1, f2):
31+
if not os.path.exists(f2):
32+
return False
33+
s1 = os.stat(f1)
34+
s2 = os.stat(f2)
35+
return SameStat(s1, s2)
36+
37+
38+
def CopyPath(src, dst):
39+
try:
40+
EnsureParentExists(dst)
41+
shutil.copytree(src, dst)
42+
except OSError as exc:
43+
if exc.errno == errno.ENOTDIR:
44+
if not SameFile(src, dst):
45+
shutil.copyfile(src, dst)
46+
else:
47+
raise
48+
49+
50+
def main():
51+
parser = argparse.ArgumentParser()
52+
53+
parser.add_argument('--file-list', dest='file_list', action='store', required=True)
54+
55+
args = parser.parse_args()
56+
57+
files = open(args.file_list, 'r')
58+
files_to_copy = files.read().split()
59+
num_files = len(files_to_copy) // 2
60+
61+
for i in range(num_files):
62+
CopyPath(files_to_copy[i], files_to_copy[num_files + i])
63+
64+
return 0
65+
66+
67+
if __name__ == '__main__':
68+
sys.exit(main())

0 commit comments

Comments
 (0)