Index: mojo/tools/mojob.py |
diff --git a/mojo/tools/mojob.py b/mojo/tools/mojob.py |
index e7bda9373d3a2bb6f926be89f2335ffa852febdf..8d8786a58e5f24a499860093dc79e9bcd3040840 100755 |
--- a/mojo/tools/mojob.py |
+++ b/mojo/tools/mojob.py |
@@ -31,6 +31,8 @@ def _args_to_config(args): |
target_os = Config.OS_ANDROID |
elif args.ios: |
target_os = Config.OS_IOS |
+ elif args.fnl: |
+ target_os = Config.OS_FNL |
target_cpu = args.target_cpu |
@@ -88,6 +90,15 @@ def _args_to_config(args): |
is_debug = args.debug and not args.official |
+ if args.target_sysroot != None: |
viettrungluu
2015/09/15 23:48:22
nit: |'target_sysroot' in args|
Or maybe |'target
cdotstout
2015/09/16 22:01:00
Done.
|
+ additional_args['target_sysroot'] = os.path.join(Paths().src_root, |
viettrungluu
2015/09/15 23:48:23
Hmmm, this implies that target_sysroot is relative
cdotstout
2015/09/16 22:01:00
Done.
|
+ args.target_sysroot) |
+ |
+ if target_os == Config.OS_FNL: |
viettrungluu
2015/09/15 23:48:23
I'm not a fan of having exits in random functions,
cdotstout
2015/09/16 22:01:00
Done.
viettrungluu
2015/09/16 22:19:46
You didn't add a check in main(). You can if you w
cdotstout
2015/09/16 22:27:09
I didn't put it in main() because doing so forces
|
+ if 'target_sysroot' not in additional_args: |
+ print "Must specify target_sysroot for FNL" |
+ sys.exit(1) |
+ |
return Config(target_os=target_os, target_cpu=target_cpu, |
is_debug=is_debug, is_official_build=args.official, |
dcheck_always_on=args.dcheck_always_on, |
@@ -244,6 +255,8 @@ def main(): |
action='store_true') |
os_group.add_argument('--ios', help='Build for iOS', |
action='store_true') |
+ os_group.add_argument('--fnl', help='Build for FNL', |
+ action='store_true') |
parent_parser.add_argument('--simulator', |
help='Build for a simulator of the target', |
@@ -253,6 +266,10 @@ def main(): |
help='CPU architecture to build for.', |
choices=['x64', 'x86', 'arm']) |
+ parent_parser.add_argument('--target-sysroot', |
+ help='Location of sysroot for target', |
+ dest='target_sysroot') |
+ |
subparsers = parser.add_subparsers() |
sync_parser = subparsers.add_parser('sync', parents=[parent_parser], |