Index: SConstruct |
=================================================================== |
--- SConstruct (revision 8148) |
+++ SConstruct (working copy) |
@@ -911,7 +911,7 @@ |
# |
# Various variables in the scons environment are related to this, e.g. |
# |
-# BUILD_ARCH: (arm, x86) |
+# BUILD_ARCH: (arm, mips, x86) |
# BUILD_SUBARCH: (32, 64) |
# |
# The settings can be controlled using scons command line variables: |
@@ -926,6 +926,7 @@ |
AVAILABLE_PLATFORMS = { |
'x86-32' : { 'arch' : 'x86' , 'subarch' : '32' }, |
'x86-64' : { 'arch' : 'x86' , 'subarch' : '64' }, |
+ 'mips' : { 'arch' : 'mips', 'subarch' : '32' }, |
Mark Seaborn
2012/04/04 21:04:22
Should this be called "mips32"?
|
'arm' : { 'arch' : 'arm' , 'subarch' : '32' }, |
'arm-thumb2' : { 'arch' : 'arm' , 'subarch' : '32' } |
} |
@@ -954,6 +955,8 @@ |
exclusive_groups='build_arch') |
DeclareBit('build_x86_64', 'Building binaries for the x86-64 architecture', |
exclusive_groups='build_arch') |
+DeclareBit('build_mips', 'Building binaries for the MIPS architecture', |
+ exclusive_groups='build_arch') |
DeclareBit('build_arm_arm', 'Building binaries for the ARM architecture', |
exclusive_groups='build_arch') |
DeclareBit('build_arm_thumb2', |
@@ -963,6 +966,8 @@ |
exclusive_groups='target_arch') |
DeclareBit('target_x86_64', 'Tools being built will process x86-36 binaries', |
exclusive_groups='target_arch') |
+DeclareBit('target_mips', 'Tools being built will process MIPS binaries', |
+ exclusive_groups='target_arch') |
DeclareBit('target_arm_arm', 'Tools being built will process ARM binaries', |
exclusive_groups='target_arch') |
DeclareBit('target_arm_thumb2', |
@@ -1013,6 +1018,10 @@ |
# This has always been a silent default on ARM. |
env.SetBits('bitcode') |
+ if env.Bit('target_mips') and not env.Bit('bitcode'): |
+ # This is a silent default on MIPS. |
+ env.SetBits('bitcode') |
+ |
# Determine where the object files go |
if BUILD_NAME == TARGET_NAME: |
BUILD_TARGET_NAME = TARGET_NAME |
@@ -1158,6 +1167,8 @@ |
if validator is None: |
if env.Bit('build_arm'): |
validator = 'arm-ncval-core' |
+ elif env.Bit('build_mips'): |
+ validator = 'mips-ncval-core' |
else: |
validator = 'ncval' |
@@ -1733,7 +1744,8 @@ |
# Disabled for ARM because Chrome binaries for ARM are not available. |
def PPAPIBrowserTesterIsBroken(env): |
- return env.Bit('target_arm') or env.Bit('target_arm_thumb2') |
+ return (env.Bit('target_arm') or env.Bit('target_arm_thumb2') |
+ or env.Bit('target_mips')) |
Mark Seaborn
2012/04/04 21:04:22
Nit: Indent by 1 more to line up with '('
|
pre_base_env.AddMethod(PPAPIBrowserTesterIsBroken) |
@@ -1946,6 +1958,10 @@ |
sel_universal_flags.append('--command_prefix') |
sel_universal_flags.append(GetEmulator(env)) |
+ if env.Bit('target_mips') and env.UsingEmulator(): |
Mark Seaborn
2012/04/04 21:04:22
This is a duplicate of the previous block, right?
|
+ sel_universal_flags.append('--command_prefix') |
+ sel_universal_flags.append(GetEmulator(env)) |
+ |
if 'TRUSTED_ENV' not in env: |
return [] |
sel_universal = env['TRUSTED_ENV'].File( |
@@ -2547,6 +2563,11 @@ |
BUILD_SCONSCRIPTS = [ |
'src/trusted/validator_arm/build.scons', |
]) |
+ if base_env.Bit('target_mips'): |
Mark Seaborn
2012/04/04 21:04:22
Please make this unconditional: I want to ensure t
|
+ base_env.Append( |
+ BUILD_SCONSCRIPTS = [ |
+ 'src/trusted/validator_mips/build.scons', |
+ ]) |
base_env.Replace( |
NACL_BUILD_FAMILY = 'TRUSTED', |
@@ -2983,6 +3004,8 @@ |
linux_env.FilterOut(LIBPATH=['/usr/lib']) |
# This appears to be needed for sel_universal |
linux_env.Append(LIBS=['dl']) |
+ elif linux_env.Bit('build_mips'): |
+ print 'placeholder for MIPS' |
Mark Seaborn
2012/04/04 21:04:22
You can just replace this with "pass". No need to
|
else: |
Banner('Strange platform: %s' % BUILD_NAME) |