Build ia32 target with sysroot

This commit is contained in:
Cheng Zhao 2015-07-02 05:07:56 +00:00
Родитель 6088af623e
Коммит f2daeb9d70
5 изменённых файлов: 23 добавлений и 12 удалений

1
.gitignore поставляемый
Просмотреть файл

@ -5,6 +5,7 @@
/out/
/vendor/brightray/vendor/download/
/vendor/debian_wheezy_arm-sysroot/
/vendor/debian_wheezy_i386-sysroot/
/vendor/python_26/
/vendor/npm/
/vendor/llvm/

Просмотреть файл

@ -33,8 +33,6 @@
'V8_BASE': '',
'v8_postmortem_support': 'false',
'v8_enable_i18n_support': 'false',
# Required by Linux (empty for now, should support it in future).
'sysroot': '',
},
# Settings to compile node under Windows.
'target_defaults': {

Просмотреть файл

@ -33,8 +33,8 @@ def main():
update_node_modules('.')
bootstrap_brightray(args.dev, args.url, args.target_arch)
if args.target_arch == 'arm':
download_arm_sysroot()
if args.target_arch in ['arm', 'ia32'] and PLATFORM == 'linux':
download_sysroot(args.target_arch)
create_chrome_version_h()
touch_config_gypi()
@ -123,9 +123,11 @@ def update_clang():
execute_stdout([os.path.join(SOURCE_ROOT, 'script', 'update-clang.sh')])
def download_arm_sysroot():
def download_sysroot(target_arch):
if target_arch == 'ia32':
target_arch = 'i386'
execute_stdout([os.path.join(SOURCE_ROOT, 'script', 'install-sysroot.py'),
'--arch', 'arm'])
'--arch', target_arch])
def create_chrome_version_h():

Просмотреть файл

@ -31,13 +31,13 @@ SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
URL_PREFIX = 'https://github.com'
URL_PATH = 'atom/debian-sysroot-image-creator/releases/download'
REVISION_AMD64 = 264817
REVISION_I386 = 264817
REVISION_I386 = 'v0.2.0'
REVISION_ARM = 'v0.1.0'
TARBALL_AMD64 = 'debian_wheezy_amd64_sysroot.tgz'
TARBALL_I386 = 'debian_wheezy_i386_sysroot.tgz'
TARBALL_ARM = 'debian_wheezy_arm_sysroot.tgz'
TARBALL_AMD64_SHA1SUM = '74b7231e12aaf45c5c5489d9aebb56bd6abb3653'
TARBALL_I386_SHA1SUM = 'fe3d284926839683b00641bc66c9023f872ea4b4'
TARBALL_I386_SHA1SUM = 'f5b2ceaeb3f7e6bc2058733585fe877d002b5fa7'
TARBALL_ARM_SHA1SUM = '72e668c57b8591e108759584942ddb6f6cee1322'
SYSROOT_DIR_AMD64 = 'debian_wheezy_amd64-sysroot'
SYSROOT_DIR_I386 = 'debian_wheezy_i386-sysroot'

Просмотреть файл

@ -8,6 +8,9 @@
# Set this to true when building with Clang.
'clang%': 1,
# Path to sysroot dir.
'sysroot%': '',
'variables': {
# Set ARM architecture version.
'arm_version%': 7,
@ -90,11 +93,18 @@
}], # clang==1
# Setup sysroot environment.
['OS=="linux" and target_arch=="arm"', {
['OS=="linux" and target_arch in ["arm", "ia32"]', {
'variables': {
# sysroot needs to be an absolute path otherwise it generates
# incorrect results when passed to pkg-config
'sysroot': '<(source_root)/vendor/debian_wheezy_arm-sysroot',
'conditions': [
['target_arch=="arm"', {
# sysroot needs to be an absolute path otherwise it generates
# incorrect results when passed to pkg-config
'sysroot': '<(source_root)/vendor/debian_wheezy_arm-sysroot',
}],
['target_arch=="ia32"', {
'sysroot': '<(source_root)/vendor/debian_wheezy_i386-sysroot',
}],
],
},
'target_defaults': {
'target_conditions': [