44import os
55import sys
66
7- from lib .config import LIBCHROMIUMCONTENT_COMMIT , BASE_URL , \
7+ from lib .config import LIBCHROMIUMCONTENT_COMMIT , BASE_URL , TARGET_PLATFORM , \
88 enable_verbose_mode , is_verbose_mode
99from lib .util import execute_stdout , scoped_cwd
1010
@@ -19,16 +19,15 @@ def main():
1919 os .chdir (SOURCE_ROOT )
2020
2121 args = parse_args ()
22- if (args .yes is False and
23- sys .platform not in ('win32' , 'cygwin' )):
22+ if not args .yes and TARGET_PLATFORM != 'win32' :
2423 check_root ()
2524 if args .verbose :
2625 enable_verbose_mode ()
2726 if sys .platform == 'cygwin' :
2827 update_win32_python ()
2928 update_submodules ()
3029 update_node_modules ('.' )
31- bootstrap_brightray (args .dev , args .url )
30+ bootstrap_brightray (args .dev , args .url , args . target_arch )
3231
3332 create_chrome_version_h ()
3433 touch_config_gypi ()
@@ -53,8 +52,11 @@ def parse_args():
5352 action = 'store_true' ,
5453 help = 'Run non-interactively by assuming "yes" to all ' \
5554 'prompts.' )
55+ parser .add_argument ('--target_arch' , default = 'default' ,
56+ help = 'Manually specify the arch to build for' )
5657 return parser .parse_args ()
5758
59+
5860def check_root ():
5961 if os .geteuid () == 0 :
6062 print "We suggest not running this as root, unless you're really sure."
@@ -68,9 +70,13 @@ def update_submodules():
6870 execute_stdout (['git' , 'submodule' , 'update' , '--init' , '--recursive' ])
6971
7072
71- def bootstrap_brightray (is_dev , url ):
73+ def bootstrap_brightray (is_dev , url , target_arch ):
7274 bootstrap = os .path .join (VENDOR_DIR , 'brightray' , 'script' , 'bootstrap' )
73- args = ['--commit' , LIBCHROMIUMCONTENT_COMMIT , url ]
75+ args = [
76+ '--commit' , LIBCHROMIUMCONTENT_COMMIT ,
77+ '--target_arch' , target_arch ,
78+ url ,
79+ ]
7480 if is_dev :
7581 args = ['--dev' ] + args
7682 execute_stdout ([sys .executable , bootstrap ] + args )
0 commit comments