Chromium Code Reviews| 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 |