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

Unified Diff: SConstruct

Issue 9979025: [MIPS] Adding validator for MIPS architecture. (Closed) Base URL: http://src.chromium.org/native_client/trunk/src/native_client/
Patch Set: Minor style changes. 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
« no previous file with comments | « no previous file | pnacl/build.sh » ('j') | pnacl/build.sh » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: SConstruct
diff --git a/SConstruct b/SConstruct
index 07ccf4edac1fbe960466d678b7078fe4f8c14ae9..397f077d96a6e5023432b581238436d73acc6d18 100755
--- a/SConstruct
+++ b/SConstruct
@@ -894,7 +894,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:
@@ -909,6 +909,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' }
}
@@ -937,6 +938,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',
@@ -946,6 +949,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',
@@ -992,9 +997,10 @@ def MakeArchSpecificEnv():
env.Replace(BUILD_ISA_NAME=GetPlatform('buildplatform'))
- if env.Bit('target_arm') and not env.Bit('bitcode'):
- # This has always been a silent default on ARM.
- env.SetBits('bitcode')
+ if env.Bit('target_arm') or env.Bit('target_mips32'):
+ if not env.Bit('bitcode'):
+ # This is a silent default on ARM and MIPS.
+ env.SetBits('bitcode')
# Determine where the object files go
if BUILD_NAME == TARGET_NAME:
@@ -1141,6 +1147,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'
@@ -1708,7 +1716,8 @@ pre_base_env.AddMethod(PPAPIBrowserTester)
# Disabled for ARM because Chrome binaries for ARM are not available.
Brad Chen 2012/05/04 20:16:11 Add a comment for MIPS.
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)
@@ -1920,7 +1929,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():
sel_universal_flags.append('--command_prefix')
sel_universal_flags.append(GetEmulator(env))
@@ -2513,11 +2522,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(
@@ -2899,6 +2910,9 @@ 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'):
+ # TODO(petarj): Add support for MIPS.
+ pass
else:
Banner('Strange platform: %s' % BUILD_NAME)
« no previous file with comments | « no previous file | pnacl/build.sh » ('j') | pnacl/build.sh » ('J')

Powered by Google App Engine
This is Rietveld 408576698