X Tutup
Skip to content

Commit f2daeb9

Browse files
committed
Build ia32 target with sysroot
1 parent 6088af6 commit f2daeb9

File tree

5 files changed

+23
-12
lines changed

5 files changed

+23
-12
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
/out/
66
/vendor/brightray/vendor/download/
77
/vendor/debian_wheezy_arm-sysroot/
8+
/vendor/debian_wheezy_i386-sysroot/
89
/vendor/python_26/
910
/vendor/npm/
1011
/vendor/llvm/

common.gypi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
'V8_BASE': '',
3434
'v8_postmortem_support': 'false',
3535
'v8_enable_i18n_support': 'false',
36-
# Required by Linux (empty for now, should support it in future).
37-
'sysroot': '',
3836
},
3937
# Settings to compile node under Windows.
4038
'target_defaults': {

script/bootstrap.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def main():
3333
update_node_modules('.')
3434
bootstrap_brightray(args.dev, args.url, args.target_arch)
3535

36-
if args.target_arch == 'arm':
37-
download_arm_sysroot()
36+
if args.target_arch in ['arm', 'ia32'] and PLATFORM == 'linux':
37+
download_sysroot(args.target_arch)
3838

3939
create_chrome_version_h()
4040
touch_config_gypi()
@@ -123,9 +123,11 @@ def update_clang():
123123
execute_stdout([os.path.join(SOURCE_ROOT, 'script', 'update-clang.sh')])
124124

125125

126-
def download_arm_sysroot():
126+
def download_sysroot(target_arch):
127+
if target_arch == 'ia32':
128+
target_arch = 'i386'
127129
execute_stdout([os.path.join(SOURCE_ROOT, 'script', 'install-sysroot.py'),
128-
'--arch', 'arm'])
130+
'--arch', target_arch])
129131

130132

131133
def create_chrome_version_h():

script/install-sysroot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@
3131
URL_PREFIX = 'https://github.com'
3232
URL_PATH = 'atom/debian-sysroot-image-creator/releases/download'
3333
REVISION_AMD64 = 264817
34-
REVISION_I386 = 264817
34+
REVISION_I386 = 'v0.2.0'
3535
REVISION_ARM = 'v0.1.0'
3636
TARBALL_AMD64 = 'debian_wheezy_amd64_sysroot.tgz'
3737
TARBALL_I386 = 'debian_wheezy_i386_sysroot.tgz'
3838
TARBALL_ARM = 'debian_wheezy_arm_sysroot.tgz'
3939
TARBALL_AMD64_SHA1SUM = '74b7231e12aaf45c5c5489d9aebb56bd6abb3653'
40-
TARBALL_I386_SHA1SUM = 'fe3d284926839683b00641bc66c9023f872ea4b4'
40+
TARBALL_I386_SHA1SUM = 'f5b2ceaeb3f7e6bc2058733585fe877d002b5fa7'
4141
TARBALL_ARM_SHA1SUM = '72e668c57b8591e108759584942ddb6f6cee1322'
4242
SYSROOT_DIR_AMD64 = 'debian_wheezy_amd64-sysroot'
4343
SYSROOT_DIR_I386 = 'debian_wheezy_i386-sysroot'

toolchain.gypi

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
# Set this to true when building with Clang.
99
'clang%': 1,
1010

11+
# Path to sysroot dir.
12+
'sysroot%': '',
13+
1114
'variables': {
1215
# Set ARM architecture version.
1316
'arm_version%': 7,
@@ -90,11 +93,18 @@
9093
}], # clang==1
9194

9295
# Setup sysroot environment.
93-
['OS=="linux" and target_arch=="arm"', {
96+
['OS=="linux" and target_arch in ["arm", "ia32"]', {
9497
'variables': {
95-
# sysroot needs to be an absolute path otherwise it generates
96-
# incorrect results when passed to pkg-config
97-
'sysroot': '<(source_root)/vendor/debian_wheezy_arm-sysroot',
98+
'conditions': [
99+
['target_arch=="arm"', {
100+
# sysroot needs to be an absolute path otherwise it generates
101+
# incorrect results when passed to pkg-config
102+
'sysroot': '<(source_root)/vendor/debian_wheezy_arm-sysroot',
103+
}],
104+
['target_arch=="ia32"', {
105+
'sysroot': '<(source_root)/vendor/debian_wheezy_i386-sysroot',
106+
}],
107+
],
98108
},
99109
'target_defaults': {
100110
'target_conditions': [

0 commit comments

Comments
 (0)
X Tutup