Index: SConstruct |
diff --git a/SConstruct b/SConstruct |
index f3287296fd8b7aa9f66efc0a8444f188c1f47905..be1a4e53d08fa078c84073da5f31324af403da86 100755 |
--- a/SConstruct |
+++ b/SConstruct |
@@ -911,7 +911,7 @@ pre_base_env.AddMethod(Banner) |
# |
# 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 @@ pre_base_env.AddMethod(Banner) |
AVAILABLE_PLATFORMS = { |
'x86-32' : { 'arch' : 'x86' , 'subarch' : '32' }, |
'x86-64' : { 'arch' : 'x86' , 'subarch' : '64' }, |
+ 'mips32' : { 'arch' : 'mips', 'subarch' : '32' }, |
'arm' : { 'arch' : 'arm' , 'subarch' : '32' }, |
'arm-thumb2' : { 'arch' : 'arm' , 'subarch' : '32' } |
} |
@@ -954,6 +955,8 @@ DeclareBit('build_x86_32', 'Building binaries for the x86-32 architecture', |
exclusive_groups='build_arch') |
DeclareBit('build_x86_64', 'Building binaries for the x86-64 architecture', |
exclusive_groups='build_arch') |
+DeclareBit('build_mips32', '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 @@ DeclareBit('target_x86_32', 'Tools being built will process x86-32 binaries', |
exclusive_groups='target_arch') |
DeclareBit('target_x86_64', 'Tools being built will process x86-36 binaries', |
exclusive_groups='target_arch') |
+DeclareBit('target_mips32', '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 @@ def MakeArchSpecificEnv(): |
# This has always been a silent default on ARM. |
env.SetBits('bitcode') |
+ if env.Bit('target_mips32') and not env.Bit('bitcode'): |
Nick Bray (chromium)
2012/04/13 20:25:26
Optional:
if env.Bit('target_arm') or env.Bit('ta
|
+ # 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 @@ def GetValidator(env, validator): |
if validator is None: |
if env.Bit('build_arm'): |
validator = 'arm-ncval-core' |
+ elif env.Bit('build_mips32'): |
+ validator = 'mips-ncval-core' |
else: |
validator = 'ncval' |
@@ -1735,7 +1746,8 @@ pre_base_env.AddMethod(PPAPIBrowserTester) |
# 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_mips32')) |
pre_base_env.AddMethod(PPAPIBrowserTesterIsBroken) |
@@ -1947,7 +1959,7 @@ def SelUniversalTest(env, name, nexe, sel_universal_flags=None, **kwargs): |
# When run under qemu, sel_universal must sneak in qemu to the execv |
# call that spawns sel_ldr. |
- if env.Bit('target_arm') and env.UsingEmulator(): |
+ if env.UsingEmulator(): |
Brad Chen
2012/04/12 00:51:34
Have you determined that the env.Bit('target_arm')
petarj
2012/04/12 13:21:01
This has been changed per Mark's comment in the pr
|
sel_universal_flags.append('--command_prefix') |
sel_universal_flags.append(GetEmulator(env)) |
@@ -2547,11 +2559,13 @@ def MakeBaseTrustedEnv(): |
base_env.AddMethod(SDKInstallBin) |
- # The ARM validator can be built for any target that doesn't use ELFCLASS64. |
+ # The ARM and MIPS validators can be built for any target that doesn't use |
+ # ELFCLASS64. |
if not base_env.Bit('target_x86_64'): |
base_env.Append( |
BUILD_SCONSCRIPTS = [ |
'src/trusted/validator_arm/build.scons', |
+ 'src/trusted/validator_mips/build.scons', |
]) |
base_env.Replace( |
@@ -2988,6 +3002,8 @@ def MakeLinuxEnv(): |
linux_env.FilterOut(LIBPATH=['/usr/lib']) |
# This appears to be needed for sel_universal |
linux_env.Append(LIBS=['dl']) |
+ elif linux_env.Bit('build_mips32'): |
+ pass |
else: |
Banner('Strange platform: %s' % BUILD_NAME) |