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: site_scons/site_tools/naclsdk.py

Issue 9696046: Add test running support for tests generated as pexes. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 8 years, 9 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
« SConstruct ('K') | « SConstruct ('k') | tests/barebones/nacl.scons » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: site_scons/site_tools/naclsdk.py
diff --git a/site_scons/site_tools/naclsdk.py b/site_scons/site_tools/naclsdk.py
index 72c666e12ad3cffb6c58ef07af4a9095a015ddd2..4b47d9404a9ef6828f04d814b02eac618f9e6a30 100755
--- a/site_scons/site_tools/naclsdk.py
+++ b/site_scons/site_tools/naclsdk.py
@@ -214,10 +214,12 @@ def _SetEnvForPnacl(env, root):
arch = env['TARGET_FULLARCH']
assert arch in ['arm', 'arm-thumb2', 'x86-32', 'x86-64']
+ arch_flag = ' -arch %s' % arch
robertm 2012/03/13 20:57:51 having two arch flags is a little confusing. Is th
(google.com) Derek Schuff 2012/03/13 21:23:03 Actually I think the right thing to do is have san
if env.Bit('pnacl_stop_with_pexe'):
- arch_flag = ''
+ ld_arch_flag = ''
else:
- arch_flag = ' -arch %s' % arch
+ ld_arch_flag = arch_flag
+
if env.Bit('nacl_glibc'):
subroot = root + '/glibc'
@@ -248,6 +250,7 @@ def _SetEnvForPnacl(env, root):
pnacl_as = binprefix + 'as' + binext
pnacl_nm = binprefix + 'nm' + binext
pnacl_ranlib = binprefix + 'ranlib' + binext
+ pnacl_translate = binprefix + 'translate' + binext
frontend = env['PNACL_FRONTEND']
if frontend == 'clang':
@@ -273,6 +276,7 @@ def _SetEnvForPnacl(env, root):
pnacl_cxx_flags = ''
pnacl_cc_flags = ' -std=gnu99'
pnacl_ld_flags = ' ' + ' '.join(env['PNACL_BCLDFLAGS'])
+ pnacl_translate_flags = ''
if env.Bit('nacl_pic'):
pnacl_cc_flags += ' -fPIC'
@@ -280,11 +284,14 @@ def _SetEnvForPnacl(env, root):
# NOTE: this is a special hack for the pnacl backend which
# does more than linking
pnacl_ld_flags += ' -fPIC'
+ pnacl_translate_flags += ' -fPIC'
if env.Bit('use_sandboxed_translator'):
- pnacl_ld_flags += ' --pnacl-sb --pnacl-default-command-line'
+ sb_flags = ' --pnacl-sb --pnacl-default-command-line'
if env.Bit('sandboxed_translator_is_dynamic'):
- pnacl_ld_flags += ' --pnacl-sb-dynamic'
+ sb_flags += ' --pnacl-sb-dynamic'
+ pnacl_ld_flags += sb_flags
+ pnacl_translate_flags += sb_flags
if pnacl_extra_lib:
env.Prepend(LIBPATH=pnacl_extra_lib)
@@ -301,21 +308,22 @@ def _SetEnvForPnacl(env, root):
SHLIBPREFIX="lib",
SHLIBSUFFIX=".so",
OBJSUFFIX=".bc",
- LINK=pnacl_cxx + arch_flag + pnacl_ld_flags,
+ LINK=pnacl_cxx + ld_arch_flag + pnacl_ld_flags,
# Although we are currently forced to produce native output
# for LINK, we are free to produce bitcode for SHLINK
# (SharedLibrary linking) because scons doesn't do anything
# with shared libraries except use them with the toolchain.
- SHLINK=pnacl_cxx + arch_flag + pnacl_ld_flags,
+ SHLINK=pnacl_cxx + ld_arch_flag + pnacl_ld_flags,
LD=pnacl_ld,
NATIVELD=pnacl_nativeld,
AR=pnacl_ar,
- AS=pnacl_as + arch_flag,
+ AS=pnacl_as + ld_arch_flag,
RANLIB=pnacl_ranlib,
DISASS=pnacl_disass,
OBJDUMP=pnacl_disass,
STRIP=pnacl_strip,
GENNMF=pnacl_nmf,
+ TRANSLATE=pnacl_translate + arch_flag + pnacl_translate_flags,
jvoung - send to chromium... 2012/03/13 20:58:31 Actually, it looks like you have now baked in tran
(google.com) Derek Schuff 2012/03/13 21:23:03 yes, it's just those tests that need to add extra
jvoung - send to chromium... 2012/03/13 21:41:23 Can you initialize it to an empty string '' and ad
)
« SConstruct ('K') | « SConstruct ('k') | tests/barebones/nacl.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698