forked from firka/flutter
Prepare for stripping and dsyming Flutter.framework (flutter/engine#6247)
This commit is contained in:
committed by
GitHub
parent
5fc6b1eacf
commit
8236d4cc0a
2
DEPS
2
DEPS
@@ -115,7 +115,7 @@ allowed_hosts = [
|
||||
]
|
||||
|
||||
deps = {
|
||||
'src': 'https://github.com/flutter/buildroot.git' + '@' + 'c2764d3620d792e71301dff9a66866029ed200f0',
|
||||
'src': 'https://github.com/flutter/buildroot.git' + '@' + '7141218c62890635ce966e2530b465ea4c55c3e2',
|
||||
|
||||
# Fuchsia compatibility
|
||||
#
|
||||
|
||||
@@ -17,6 +17,8 @@ def main():
|
||||
parser.add_argument('--arm64-out-dir', type=str, required=True)
|
||||
parser.add_argument('--armv7-out-dir', type=str, required=True)
|
||||
parser.add_argument('--simulator-out-dir', type=str, required=True)
|
||||
parser.add_argument('--strip', action="store_true", default=False)
|
||||
parser.add_argument('--dsym', action="store_true", default=False)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
@@ -56,6 +58,8 @@ def main():
|
||||
shutil.rmtree(fat_framework, True)
|
||||
shutil.copytree(arm64_framework, fat_framework)
|
||||
|
||||
linker_out = os.path.join(fat_framework, 'Flutter')
|
||||
|
||||
subprocess.call([
|
||||
'lipo',
|
||||
arm64_dylib,
|
||||
@@ -63,9 +67,20 @@ def main():
|
||||
simulator_dylib,
|
||||
'-create',
|
||||
'-output',
|
||||
os.path.join(fat_framework, 'Flutter')
|
||||
linker_out
|
||||
])
|
||||
|
||||
if args.dsym:
|
||||
dsym_out = os.path.splitext(fat_framework)[0] + '.dSYM'
|
||||
subprocess.call(['dsymutil', '-o', dsym_out, linker_out])
|
||||
|
||||
if args.strip:
|
||||
# copy unstripped
|
||||
unstripped_out = os.path.join(args.dst, 'Flutter.unstripped')
|
||||
shutil.copyfile(linker_out, unstripped_out)
|
||||
|
||||
subprocess.call(["strip", "-x", "-S", linker_out])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
|
||||
Reference in New Issue
Block a user