Optionally strip bitcode when creating ios framework (flutter/engine#11530)

This commit is contained in:
Dan Field 2019-08-27 12:34:23 -07:00 committed by GitHub
parent 3a5a21655d
commit c5fc68f9f7

View File

@ -19,6 +19,7 @@ def main():
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)
parser.add_argument('--strip-bitcode', dest='strip_bitcode', action="store_true", default=False)
args = parser.parse_args()
@ -70,6 +71,9 @@ def main():
linker_out
])
if args.strip_bitcode:
subprocess.check_call(['xcrun', 'bitcode_strip', '-m', linker_out, '-o', linker_out])
if args.dsym:
dsym_out = os.path.splitext(fat_framework)[0] + '.dSYM'
subprocess.check_call(['dsymutil', '-o', dsym_out, linker_out])