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

Unified Diff: SConstruct

Issue 269703002: Non-SFI Mode: Add nonsfi_loader and plumbing to test it (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Review Created 6 years, 8 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.py » ('j') | buildbot/buildbot_pnacl.sh » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: SConstruct
diff --git a/SConstruct b/SConstruct
index a60acfa15ffd04d1b73348171afcebefa201b550..0e07802070e6cd7a206980a058b1c354359f5334 100755
--- a/SConstruct
+++ b/SConstruct
@@ -327,6 +327,11 @@ def SetUpArgumentBits(env):
BitFromArgument(env, 'pnacl_unsandboxed', default=False,
desc='Translate pexe to an unsandboxed, host executable')
+ BitFromArgument(env, 'nonsfi_nacl', default=False,
+ desc='Use Non-SFI Mode instead of the original SFI Mode. This uses '
+ 'nonsfi_loader instead of sel_ldr, and it tells the PNaCl toolchain '
+ 'to translate pexes to Non-SFI nexes.')
+
BitFromArgument(env, 'browser_headless', default=False,
desc='Where possible, set up a dummy display to run the browser on '
'when running browser tests. On Linux, this runs the browser through '
@@ -1293,6 +1298,15 @@ def AddBootstrap(env, executable, args):
pre_base_env.AddMethod(AddBootstrap)
+def GetNonSfiLoader(env):
+ if 'TRUSTED_ENV' not in env:
+ return None
+ return env['TRUSTED_ENV'].File(
+ '${STAGING_DIR}/${PROGPREFIX}nonsfi_loader${PROGSUFFIX}')
+
+pre_base_env.AddMethod(GetNonSfiLoader)
+
+
def GetIrtNexe(env, chrome_irt=False):
image = ARGUMENTS.get('force_irt')
if image:
@@ -1613,7 +1627,10 @@ def CommandSelLdrTestNacl(env, name, nexe,
return env.CommandTest(name, command, size, **extra)
if loader is None:
- loader = env.GetSelLdr()
+ if env.Bit('nonsfi_nacl'):
+ loader = env.GetNonSfiLoader()
+ else:
+ loader = env.GetSelLdr()
if loader is None:
print 'WARNING: no sel_ldr found. Skipping test %s' % name
return []
@@ -1673,7 +1690,12 @@ def CommandSelLdrTestNacl(env, name, nexe,
else:
loader_cmd = env.AddBootstrap(loader, [])
- command = loader_cmd + sel_ldr_flags + ['--'] + command
+ if env.Bit('nonsfi_nacl'):
+ # nonsfi_loader does not accept the same flags as sel_ldr yet, so
+ # we ignore sel_ldr_flags here.
+ command = [loader] + command
+ else:
+ command = loader_cmd + sel_ldr_flags + ['--'] + command
if env.Bit('host_linux'):
extra['using_nacl_signal_handler'] = True
@@ -2127,6 +2149,8 @@ def MakeBaseTrustedEnv(platform=None):
# KEEP THIS SORTED PLEASE
'build/package_version/build.scons',
'pynacl/build.scons',
+ 'src/nonsfi/irt/build.scons',
+ 'src/nonsfi/loader/build.scons',
'src/shared/gio/build.scons',
'src/shared/imc/build.scons',
'src/shared/ldr/build.scons',
@@ -3040,6 +3064,7 @@ target_variant_map = [
('use_sandboxed_translator', 'sbtc'),
('nacl_glibc', 'glibc'),
('pnacl_generate_pexe', 'pexe'),
+ ('nonsfi_nacl', 'nonsfi'),
]
for variant_bit, variant_suffix in target_variant_map:
if nacl_env.Bit(variant_bit):
« no previous file with comments | « no previous file | buildbot/buildbot_pnacl.py » ('j') | buildbot/buildbot_pnacl.sh » ('J')

Powered by Google App Engine
This is Rietveld 408576698