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

Unified Diff: site_scons/site_tools/naclsdk.py

Issue 9979025: [MIPS] Adding validator for MIPS architecture. (Closed) Base URL: http://src.chromium.org/native_client/trunk/src/native_client/
Patch Set: Changes after second code review. Created 8 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
Index: site_scons/site_tools/naclsdk.py
diff --git a/site_scons/site_tools/naclsdk.py b/site_scons/site_tools/naclsdk.py
index 286f2165af07b71f37391070265c44ed06801013..9509c0ff80809b265a966bd70ece9690159ace3e 100755
--- a/site_scons/site_tools/naclsdk.py
+++ b/site_scons/site_tools/naclsdk.py
@@ -217,7 +217,7 @@ def _SetEnvForPnacl(env, root):
env.AppendENVPath('PATH', python_dir)
arch = env['TARGET_FULLARCH']
- assert arch in ['arm', 'arm-thumb2', 'x86-32', 'x86-64']
+ assert arch in ['arm', 'arm-thumb2', 'mips32', 'x86-32', 'x86-64']
arch_flag = ' -arch %s' % arch
if env.Bit('pnacl_generate_pexe'):
@@ -379,6 +379,7 @@ def PNaClForceNative(env):
def PNaClGetNNaClEnv(env):
assert(env.Bit('bitcode'))
assert(not env.Bit('target_arm'))
+ assert(not env.Bit('target_mips32'))
# This is kind of a hack. We clone the environment,
# clear the bitcode bit, and then reload naclsdk.py
@@ -403,7 +404,7 @@ def PNaClGetNNaClEnv(env):
# This adds architecture specific defines for the target architecture.
# These are normally omitted by PNaCl.
-# For example: __i686__, __arm__, __x86_64__
+# For example: __i686__, __arm__, __mips__, __x86_64__
def AddBiasForPNaCl(env, temporarily_allow=True):
assert(env.Bit('bitcode'))
# re: the temporarily_allow flag -- that is for:
@@ -422,6 +423,9 @@ def AddBiasForPNaCl(env, temporarily_allow=True):
elif env.Bit('target_x86_64'):
env.AppendUnique(CCFLAGS=['--pnacl-x86_64-bias'],
ASPPFLAGS=['--pnacl-x86_64-bias'])
+ elif env.Bit('target_mips32'):
+ env.AppendUnique(CCFLAGS=['--pnacl-mips-bias'],
+ ASPPFLAGS=['--pnacl-mips-bias'])
else:
raise Exception("Unknown architecture!")

Powered by Google App Engine
This is Rietveld 408576698