Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: native_client_sdk/src/build_tools/build_sdk.py

Issue 126223002: [NaCl SDK] Add ARM sel_ldr to linux SDK (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/build_tools/build_sdk.py
diff --git a/native_client_sdk/src/build_tools/build_sdk.py b/native_client_sdk/src/build_tools/build_sdk.py
index e996e17ac770cea921d0035e95a31360feb3897d..7ba5f99ec8288636c307a80cef4f3c1db4fa45be 100755
--- a/native_client_sdk/src/build_tools/build_sdk.py
+++ b/native_client_sdk/src/build_tools/build_sdk.py
@@ -18,7 +18,6 @@ and whether it should upload an SDK to file storage (GSTORE)
# pylint: disable=W0621
# std python includes
-import copy
import datetime
import glob
import optparse
@@ -410,6 +409,8 @@ def GypNinjaInstall(pepperdir, toolchains):
ninja_out_dir = os.path.join(OUT_DIR, build_dir, 'Release')
tools_files = [
['sel_ldr', 'sel_ldr_x86_32'],
+ ['sel_ldr_x86_64', 'sel_ldr_x86_64'],
+ ['sel_ldr_arm', 'sel_ldr_arm'],
['ncval_new', 'ncval'],
['irt_core_newlib_x32.nexe', 'irt_core_x86_32.nexe'],
['irt_core_newlib_x64.nexe', 'irt_core_x86_64.nexe'],
@@ -426,13 +427,13 @@ def GypNinjaInstall(pepperdir, toolchains):
['minidump_stackwalk', 'minidump_stackwalk']
]
- tools_files.append(['sel_ldr64', 'sel_ldr_x86_64'])
-
if platform == 'linux':
tools_files.append(['nacl_helper_bootstrap',
'nacl_helper_bootstrap_x86_32'])
- tools_files.append(['nacl_helper_bootstrap64',
+ tools_files.append(['nacl_helper_bootstrap_x86_64',
'nacl_helper_bootstrap_x86_64'])
+ tools_files.append(['nacl_helper_bootstrap_arm',
+ 'nacl_helper_bootstrap_arm'])
buildbot_common.MakeDir(os.path.join(pepperdir, 'tools'))
@@ -481,16 +482,24 @@ def GypNinjaBuild_NaCl(rel_out_dir):
out_dir_64 = MakeNinjaRelPath(rel_out_dir + '-64')
GypNinjaBuild('x64', gyp_py, nacl_core_sdk_gyp, 'sel_ldr', out_dir_64)
- # We only need sel_ldr from the 64-bit out directory.
- # sel_ldr needs to be renamed, so we'll call it sel_ldr64.
- files_to_copy = [('sel_ldr', 'sel_ldr64')]
+ files_to_copy = ['sel_ldr']
if platform == 'linux':
- files_to_copy.append(('nacl_helper_bootstrap', 'nacl_helper_bootstrap64'))
+ files_to_copy.append('nacl_helper_bootstrap')
+
+ out_dir = os.path.join(SRC_DIR, out_dir, 'Release')
+ out_dir_64 = os.path.join(SRC_DIR, out_dir_64, 'Release')
+ out_dir_arm = os.path.join(SRC_DIR, out_dir_arm, 'Release')
+
+ for src in files_to_copy:
+ buildbot_common.CopyFile(
+ os.path.join(out_dir_64, src), os.path.join(out_dir, src + '_x86_64'))
+ buildbot_common.CopyFile(
+ os.path.join(out_dir_arm, src), os.path.join(out_dir, src + '_arm'))
- for src, dst in files_to_copy:
+ if platform == 'linux':
buildbot_common.CopyFile(
- os.path.join(SRC_DIR, out_dir_64, 'Release', src),
- os.path.join(SRC_DIR, out_dir, 'Release', dst))
+ os.path.join(out_dir_arm, 'irt_core_newlib_arm.nexe'),
+ os.path.join(out_dir, 'irt_core_newlib_arm.nexe'))
def GypNinjaBuild_Breakpad(rel_out_dir):
@@ -529,7 +538,7 @@ def GypNinjaBuild_Pnacl(rel_out_dir, target_arch):
def GypNinjaBuild(arch, gyp_py_script, gyp_file, targets,
out_dir, force_arm_gcc=True):
- gyp_env = copy.copy(os.environ)
+ gyp_env = dict(os.environ)
gyp_env['GYP_GENERATORS'] = 'ninja'
gyp_defines = []
if options.mac_sdk:
@@ -537,16 +546,25 @@ def GypNinjaBuild(arch, gyp_py_script, gyp_file, targets,
if arch:
gyp_defines.append('target_arch=%s' % arch)
if arch == 'arm':
- gyp_defines += ['armv7=1', 'arm_thumb=0', 'arm_neon=1']
+ if getos.GetPlatform() == 'linux':
+ gyp_env['CC'] = 'arm-linux-gnueabihf-gcc'
+ gyp_env['CXX'] = 'arm-linux-gnueabihf-g++'
+ gyp_env['AR'] = 'arm-linux-gnueabihf-ar'
+ gyp_env['AS'] = 'arm-linux-gnueabihf-as'
+ gyp_env['CC_host'] = 'cc'
+ gyp_env['CXX_host'] = 'c++'
binji 2014/01/08 23:01:15 requires installing arm cross toolchain
+ gyp_defines += ['armv7=1', 'arm_thumb=0', 'arm_neon=1',
+ 'arm_float_abi=hard']
if force_arm_gcc:
gyp_defines.append('nacl_enable_arm_gcc=1')
if getos.GetPlatform() == 'mac':
gyp_defines.append('clang=1')
gyp_env['GYP_DEFINES'] = ' '.join(gyp_defines)
- for key in ['GYP_GENERATORS', 'GYP_DEFINES']:
- value = gyp_env[key]
- print '%s="%s"' % (key, value)
+ for key in ['GYP_GENERATORS', 'GYP_DEFINES', 'CC']:
+ value = gyp_env.get(key)
+ if value is not None:
+ print '%s="%s"' % (key, value)
gyp_generator_flags = ['-G', 'output_dir=%s' % (out_dir,)]
gyp_depth = '--depth=.'
buildbot_common.Run(
« no previous file with comments | « no previous file | native_client_sdk/src/build_tools/sdk_files.list » ('j') | native_client_sdk/src/build_tools/sdk_files.list » ('J')

Powered by Google App Engine
This is Rietveld 408576698