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

Unified Diff: SConstruct

Issue 9695064: Simplify GetTranslatedNexe() (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Rebase 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
« no previous file with comments | « no previous file | site_scons/site_tools/naclsdk.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: SConstruct
diff --git a/SConstruct b/SConstruct
index 68ffc05f52c2e89e1a19fe0f70e413437d38f519..25193bc043fb06d9624e61446a0ea2f9d3560026 100755
--- a/SConstruct
+++ b/SConstruct
@@ -1953,16 +1953,13 @@ def ShouldUseVerboseOptions(extra):
# ----------------------------------------------------------
DeclareBit('tests_use_irt', 'Non-browser tests also load the IRT image', False)
-# Translate the given pexe. Return the name of the translated nexe and
+# Translate the given pexe.
def GetTranslatedNexe(env, pexe):
pexe_name = pexe.abspath
nexe_name = pexe_name[:pexe_name.index('.pexe')] + '.nexe'
- trans_flags = []
trans_cmd = ('${TRANSLATE} ${TRANSLATEFLAGS} -Wl,-L${LIB_DIR} %s -o %s' %
(pexe_name, nexe_name))
-
- pexe_node = env.Command(nexe_name, pexe_name, trans_cmd)
- return nexe_name, pexe_node
+ return env.Command(nexe_name, pexe_name, trans_cmd)
pre_base_env.AddMethod(GetTranslatedNexe)
@@ -1987,15 +1984,10 @@ def CommandSelLdrTestNacl(env, name, nexe,
env['TRUSTED_ENV'].Bit('windows')):
return []
- if (env.Bit('pnacl_generate_pexe') and env['NACL_BUILD_FAMILY'] != 'TRUSTED'):
- # The nexe is actually a pexe. translate it before we run it
- nexe_name, pexe_node = GetTranslatedNexe(env, nexe)
- command = [nexe_name]
- extra_deps = [pexe_node]
- else:
- command = [nexe]
- extra_deps = []
-
+ if env.Bit('pnacl_generate_pexe') and env['NACL_BUILD_FAMILY'] != 'TRUSTED':
+ # The nexe is actually a pexe. Translate it before we run it.
+ nexe = GetTranslatedNexe(env, nexe)
+ command = [nexe]
if args is not None:
command += args
@@ -2049,8 +2041,7 @@ def CommandSelLdrTestNacl(env, name, nexe,
env.MakeVerboseExtraOptions(name, log_verbosity, extra)
node = CommandTest(env, name, command, size, posix_path=True,
- wrapper_program_prefix=wrapper_program_prefix,
- extra_deps=extra_deps, **extra)
+ wrapper_program_prefix=wrapper_program_prefix, **extra)
if env.Bit('tests_use_irt'):
env.Alias('irt_tests', node)
return node
« no previous file with comments | « no previous file | site_scons/site_tools/naclsdk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698