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

Unified Diff: SConstruct

Issue 9824001: Change built_elsewhere flag to work with pexe mode (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: add AS, line len 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 | buildbot/buildbot_pnacl.sh » ('j') | site_scons/site_tools/naclsdk.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: SConstruct
diff --git a/SConstruct b/SConstruct
index 8f9ce91a9fb522325bde7ec2c471ae199a60e5d4..e30628f0ddd959fe7cad001397264e162f7856a5 100755
--- a/SConstruct
+++ b/SConstruct
@@ -1978,13 +1978,9 @@ def GetTranslatedNexe(env, pexe):
pexe_name = pexe.abspath
nexe_name = pexe_name[:pexe_name.index('.pexe')] + '.nexe'
+ env.Precious(pexe)
jvoung - send to chromium... 2012/03/21 23:15:04 Could you add a comment explaining the need for en
(google.com) Derek Schuff 2012/03/22 00:02:02 Done.
node = env.Command(target=nexe_name, source=[pexe_name],
action=[Action('${TRANSLATECOM}', '${TRANSLATECOMSTR}')])
- # Ignore nexe dependency on pexe and assume it's already there. This replaces
- # ignoring the test dependency on the nexe, which is what built_elsewhere
- # does when not in pnacl_generate_pexe mode
- if env.Bit('built_elsewhere'):
- env.Ignore(nexe_name, pexe_name)
return node
pre_base_env.AddMethod(GetTranslatedNexe)
@@ -2312,13 +2308,11 @@ def AutoDepsCommand(env, name, command, extra_deps=[], posix_path=False,
command[index] = '${SOURCES[%d].abspath}' % len(deps)
deps.append(arg)
- # If we are testing build output captured from elsewhere,
- # ignore build dependencies, (except pexe translation, which we always
- # want to do in pnacl_generate_pexe mode)
- if env.Bit('built_elsewhere') and not env.Bit('pnacl_generate_pexe'):
- env.Ignore(name, deps)
- else:
- env.Depends(name, extra_deps)
+ # If built_elsewhere, build commands are replaced by no-ops, so make sure
+ # the targets don't get removed first
+ if env.Bit('built_elsewhere'):
+ env.Precious(deps)
jvoung - send to chromium... 2012/03/21 23:15:04 Should extra_deps be precious as well?
(google.com) Derek Schuff 2012/03/22 00:02:02 The only thing that really needs to be precious is
+ env.Depends(name, extra_deps)
if disabled:
return env.DisabledCommand(name, deps)
@@ -2885,11 +2879,16 @@ def MakeLinuxEnv():
)
elif linux_env.Bit('build_arm'):
if linux_env.Bit('built_elsewhere'):
- # force an unusable environment here
- linux_env.Replace(CC='NO-ARM-CC-INVOCATION-ALLOWED',
- CXX='NO-ARM-CXX-INVOCATION-ALLOWED',
- LD='NO-ARM-LD-INVOCATION-ALLOWD',
- )
+ def FakeInstall(dest, source, env):
+ print 'Not installing', dest
+ # Replace build commands with no-ops
jvoung - send to chromium... 2012/03/21 23:15:04 I wonder if 'true' would work on Windows, but... b
(google.com) Derek Schuff 2012/03/22 00:02:02 well I guess it's conceivable if we want to have a
+ linux_env.Replace(CC='true', CXX='true', LD='true',
+ AR='true', RANLIB='true', INSTALL=FakeInstall)
+ # Allow emulation for testing built_elsewhere flag
jvoung - send to chromium... 2012/03/21 23:15:04 Should this emulation setting be removed before co
(google.com) Derek Schuff 2012/03/22 00:02:02 the platform.machine() test makes sure it's only e
jvoung - send to chromium... 2012/03/22 00:17:45 Ah of course.
+ if not platform.machine().startswith('arm'):
+ jail = '${SCONSTRUCT_DIR}/toolchain/linux_arm-trusted'
+ linux_env.Replace(EMULATOR=jail + '/run_under_qemu_arm')
+
###############################################################
# EXPERIMENTAL
# This is needed to switch to a different trusted cross
« no previous file with comments | « no previous file | buildbot/buildbot_pnacl.sh » ('j') | site_scons/site_tools/naclsdk.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698