/external_binaries/
/out/
/vendor/brightray/vendor/download/
+/vendor/debian_wheezy_amd64-sysroot/
/vendor/debian_wheezy_arm-sysroot/
/vendor/debian_wheezy_i386-sysroot/
/vendor/python_26/
args.libcc_source_path, args.libcc_shared_library_path,
args.libcc_static_library_path)
- if args.target_arch in ['arm', 'ia32'] and PLATFORM == 'linux':
- download_sysroot(args.target_arch)
+ if PLATFORM == 'linux':
+ download_sysroot(args.target_arch, args.sysroot_url, args.sysroot_sha1sum)
create_chrome_version_h()
touch_config_gypi()
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()
execute_stdout([os.path.join(SOURCE_ROOT, 'script', 'update-clang.sh')])
-def download_sysroot(target_arch):
- if target_arch == 'ia32':
- target_arch = 'i386'
- execute_stdout([os.path.join(SOURCE_ROOT, 'script', 'install-sysroot.py'),
- '--arch', target_arch])
+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 create_chrome_version_h():
print 'Unknown architecture: %s' % target_arch
assert(False)
- url = '%s/%s/%s/%s' % (URL_PREFIX, URL_PATH, revision, tarball_filename)
+ if options.url:
+ url = options.url
+ tarball_sha1sum = options.revision
+ else:
+ url = '%s/%s/%s/%s' % (URL_PREFIX, URL_PATH, revision, tarball_filename)
stamp = os.path.join(sysroot, '.stamp')
if os.path.exists(stamp):
sys.stdout.flush()
sys.stderr.flush()
subprocess.check_call(['curl', '--fail', '-L', url, '-o', tarball])
- sha1sum = GetSha1(tarball)
- if sha1sum != tarball_sha1sum:
- print 'Tarball sha1sum is wrong.'
- print 'Expected %s, actual: %s' % (tarball_sha1sum, sha1sum)
- return 1
+ if tarball_sha1sum:
+ sha1sum = GetSha1(tarball)
+ if sha1sum != tarball_sha1sum:
+ print 'Tarball sha1sum is wrong.'
+ print 'Expected %s, actual: %s' % (tarball_sha1sum, sha1sum)
+ return 1
subprocess.check_call(['tar', 'xf', tarball, '-C', sysroot])
os.remove(tarball)
'Linux builds')
parser.add_option('--arch', type='choice', choices=valid_archs,
help='Sysroot architecture: %s' % ', '.join(valid_archs))
+ parser.add_option('--url', default=None,
+ help='The URL to download sysroot image.')
+ parser.add_option('--revision', default=None,
+ help='SHA1 hash of the sysroot image tarball.')
options, _ = parser.parse_args()
sys.exit(main())
mas_build = 1
else:
mas_build = 0
+ # Whether to use sysroot image.
+ if os.environ.has_key('USE_SYSROOT'):
+ use_sysroot = 1
+ else:
+ use_sysroot = 0
defines = [
'-Dlibchromiumcontent_component={0}'.format(component),
'-Dtarget_arch={0}'.format(target_arch),
'-Dhost_arch={0}'.format(get_host_arch()),
'-Dlibrary=static_library',
'-Dmas_build={0}'.format(mas_build),
+ '-Duse_sysroot={0}'.format(use_sysroot)
]
return subprocess.call([python, gyp, '-f', 'ninja', '--depth', '.',
'atom.gyp', '-Icommon.gypi'] + defines, env=env)
}],
# Setup sysroot environment.
- ['OS=="linux" and target_arch in ["arm", "ia32"]', {
+ ['OS=="linux" and target_arch in ["arm", "ia32", "x64"] and use_sysroot', {
'variables': {
'conditions': [
['target_arch=="arm"', {
['target_arch=="ia32"', {
'sysroot': '<(source_root)/vendor/debian_wheezy_i386-sysroot',
}],
+ ['target_arch=="x64"', {
+ 'sysroot': '<(source_root)/vendor/debian_wheezy_amd64-sysroot',
+ }],
],
},
'target_defaults': {