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

Unified Diff: pydir/utils.py

Issue 1506653002: Subzero: Add Non-SFI support for x86-32. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 4 years, 12 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 | « pydir/szbuild_spec2k.py ('k') | runtime/szrt_asm_arm32.s » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pydir/utils.py
diff --git a/pydir/utils.py b/pydir/utils.py
index 1141e3e1a0f577396f9f11c3feacb3703bcbc5ce..6fdedfafae03f4d1968e303661a9107c699fe818 100644
--- a/pydir/utils.py
+++ b/pydir/utils.py
@@ -20,3 +20,12 @@ def FindBaseNaCl():
return None
last_index = len(path_list) - path_list[::-1].index(nacl)
return os.sep.join(path_list[:last_index])
+
+def get_sfi_string(args, sb_ret, nonsfi_ret, native_ret):
+ """Return a value depending on args.sandbox and args.nonsfi."""
+ if args.sandbox:
+ assert(not args.nonsfi)
+ return sb_ret
+ if args.nonsfi:
+ return nonsfi_ret
+ return native_ret
« no previous file with comments | « pydir/szbuild_spec2k.py ('k') | runtime/szrt_asm_arm32.s » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698