use sysroot by default on linux

This commit is contained in:
Robo 2016-03-08 20:35:32 +05:30
parent e27e3d641c
commit 91951472bf
4 changed files with 21 additions and 50 deletions

View file

@ -44,7 +44,7 @@ def main():
args.libcc_static_library_path)
if PLATFORM == 'linux':
download_sysroot(args.target_arch, args.sysroot_url, args.sysroot_sha1sum)
download_sysroot(args.target_arch)
create_chrome_version_h()
touch_config_gypi()
@ -79,10 +79,6 @@ def parse_args():
help='The shared library path of libchromiumcontent.')
parser.add_argument('--libcc_static_library_path', required=False,
help='The static library path of libchromiumcontent.')
parser.add_argument('--sysroot_url', required=False,
help='The URL to download sysroot image.')
parser.add_argument('--sysroot_sha1sum', required=False,
help='SHA1 hash of the sysroot image tarball.')
return parser.parse_args()
@ -167,23 +163,13 @@ def update_clang():
execute_stdout([os.path.join(SOURCE_ROOT, 'script', 'update-clang.sh')])
def download_sysroot(target_arch, url, sha1sum):
if url or target_arch in ['ia32', 'arm']:
os.environ['USE_SYSROOT'] = '1'
sysroot_script = os.path.join(SOURCE_ROOT, 'script', 'install-sysroot.py')
if target_arch == 'ia32':
target_arch = 'i386'
if target_arch == 'x64':
target_arch = 'amd64'
args = [
'--arch', target_arch
]
if url:
args += ['--url', url]
if sha1sum:
args += ['--revision', sha1sum]
execute_stdout([sysroot_script] + args)
def download_sysroot(target_arch):
if target_arch == 'ia32':
target_arch = 'i386'
if target_arch == 'x64':
target_arch = 'amd64'
execute_stdout([os.path.join(SOURCE_ROOT, 'script', 'install-sysroot.py'),
'--arch', target_arch])
def create_chrome_version_h():
version_file = os.path.join(SOURCE_ROOT, 'vendor', 'brightray', 'vendor',