未验证 提交 ed270d40 编写于 作者: M Matej Knopp 提交者: GitHub

Add mac as target_os and mac_cpu (#25810)

https://github.com/flutter/flutter/issues/69221

This allows creating build folders for macOS cross compilation
上级 10de8f47
......@@ -39,6 +39,9 @@ def get_out_dir(args):
if args.ios_cpu != 'arm64':
target_dir.append(args.ios_cpu)
if args.mac_cpu != 'x64':
target_dir.append(args.mac_cpu)
if args.simulator_cpu != 'x64':
target_dir.append(args.simulator_cpu)
......@@ -183,6 +186,8 @@ def to_gn_args(args):
gn_args['target_cpu'] = args.simulator_cpu
else:
gn_args['target_cpu'] = args.ios_cpu
elif args.target_os == 'mac':
gn_args['target_cpu'] = args.mac_cpu
elif args.target_os == 'linux':
gn_args['target_cpu'] = args.linux_cpu
elif args.target_os == 'fuchsia':
......@@ -350,11 +355,13 @@ def parse_args(args):
parser.add_argument('--full-dart-debug', default=False, action='store_true', help='Implies --dart-debug ' +
'and also disables optimizations in the Dart VM making it easier to step through VM code in the debugger.')
parser.add_argument('--target-os', type=str, choices=['android', 'ios', 'linux', 'fuchsia', 'win', 'winuwp'])
parser.add_argument('--target-os', type=str, choices=['android', 'ios', 'mac', 'linux', 'fuchsia', 'win', 'winuwp'])
parser.add_argument('--android', dest='target_os', action='store_const', const='android')
parser.add_argument('--android-cpu', type=str, choices=['arm', 'x64', 'x86', 'arm64'], default='arm')
parser.add_argument('--ios', dest='target_os', action='store_const', const='ios')
parser.add_argument('--ios-cpu', type=str, choices=['arm', 'arm64'], default='arm64')
parser.add_argument('--mac', dest='target_os', action='store_const', const='mac')
parser.add_argument('--mac-cpu', type=str, choices=['x64', 'arm64'], default='x64')
parser.add_argument('--simulator', action='store_true', default=False)
parser.add_argument('--linux', dest='target_os', action='store_const', const='linux')
parser.add_argument('--fuchsia', dest='target_os', action='store_const', const='fuchsia')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册