mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 14:32:49 +00:00
Add mips and simmips build targets.
Review URL: https://codereview.chromium.org//11859034 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17319 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
e8a07483ca
commit
350fa57800
|
@ -85,15 +85,21 @@
|
|||
#elif defined(__ARMEL__)
|
||||
#define HOST_ARCH_ARM 1
|
||||
#define ARCH_IS_32_BIT 1
|
||||
#elif defined(__MIPSEL__)
|
||||
#define HOST_ARCH_MIPS 1
|
||||
#define ARCH_IS_32_BIT 1
|
||||
#else
|
||||
#error Architecture was not detected as supported by Dart.
|
||||
#endif
|
||||
|
||||
#if !defined(TARGET_ARCH_MIPS)
|
||||
#if !defined(TARGET_ARCH_ARM)
|
||||
#if !defined(TARGET_ARCH_X64)
|
||||
#if !defined(TARGET_ARCH_IA32)
|
||||
// No target architecture specified pick the one matching the host architecture.
|
||||
#if defined(HOST_ARCH_ARM)
|
||||
#if defined(HOST_ARCH_MIPS)
|
||||
#define TARGET_ARCH_MIPS 1
|
||||
#elif defined(HOST_ARCH_ARM)
|
||||
#define TARGET_ARCH_ARM 1
|
||||
#elif defined(HOST_ARCH_X64)
|
||||
#define TARGET_ARCH_X64 1
|
||||
|
@ -105,6 +111,7 @@
|
|||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Verify that host and target architectures match, we cannot
|
||||
// have a 64 bit Dart VM generating 32 bit code or vice-versa.
|
||||
|
@ -112,7 +119,9 @@
|
|||
#if !defined(ARCH_IS_64_BIT)
|
||||
#error Mismatched Host/Target architectures.
|
||||
#endif
|
||||
#elif defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_ARM)
|
||||
#elif defined(TARGET_ARCH_IA32) || \
|
||||
defined(TARGET_ARCH_ARM) || \
|
||||
defined(TARGET_ARCH_MIPS)
|
||||
#if !defined(ARCH_IS_32_BIT)
|
||||
#error Mismatched Host/Target architectures.
|
||||
#endif
|
||||
|
|
|
@ -30,7 +30,7 @@ def BuildOptions():
|
|||
default=False, action="store_true")
|
||||
result.add_option("-a", "--arch",
|
||||
help='Target architectures (comma-separated).',
|
||||
metavar='[all,ia32,x64,simarm,arm]',
|
||||
metavar='[all,ia32,x64,simarm,arm,simmips,mips]',
|
||||
default=utils.GuessArchitecture())
|
||||
result.add_option("--os",
|
||||
help='Target OSs (comma-separated).',
|
||||
|
@ -71,7 +71,7 @@ def ProcessOptions(options, args):
|
|||
print "Unknown mode %s" % mode
|
||||
return False
|
||||
for arch in options.arch:
|
||||
if not arch in ['ia32', 'x64', 'simarm', 'arm']:
|
||||
if not arch in ['ia32', 'x64', 'simarm', 'arm', 'simmips', 'mips']:
|
||||
print "Unknown arch %s" % arch
|
||||
return False
|
||||
options.os = [ProcessOsOption(os) for os in options.os]
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
['"<(target_arch)"=="x64"', { 'dart_target_arch': 'X64', }],
|
||||
['"<(target_arch)"=="arm"', { 'dart_target_arch': 'ARM', }],
|
||||
['"<(target_arch)"=="simarm"', { 'dart_target_arch': 'SIMARM', }],
|
||||
['"<(target_arch)"=="mips"', { 'dart_target_arch': 'MIPS', }],
|
||||
['"<(target_arch)"=="simmips"', { 'dart_target_arch': 'SIMMIPS', }],
|
||||
],
|
||||
},
|
||||
'conditions': [
|
||||
|
@ -60,6 +62,20 @@
|
|||
],
|
||||
},
|
||||
|
||||
'Dart_simmips_Base': {
|
||||
'abstract': 1,
|
||||
'defines': [
|
||||
'TARGET_ARCH_MIPS',
|
||||
]
|
||||
},
|
||||
|
||||
'Dart_mips_Base': {
|
||||
'abstract': 1,
|
||||
'defines': [
|
||||
'TARGET_ARCH_MIPS',
|
||||
],
|
||||
},
|
||||
|
||||
'Dart_Debug': {
|
||||
'abstract': 1,
|
||||
},
|
||||
|
@ -113,6 +129,32 @@
|
|||
'inherit_from': ['Dart_Base', 'Dart_arm_Base', 'Dart_Release'],
|
||||
},
|
||||
|
||||
'DebugSIMMIPS': {
|
||||
# Should not inherit from Dart_Debug because Dart_simmips_Base defines
|
||||
# the optimization level to be -O3, as the simulator runs too slow
|
||||
# otherwise.
|
||||
'inherit_from': ['Dart_Base', 'Dart_simmips_Base'],
|
||||
'defines': [
|
||||
'DEBUG',
|
||||
],
|
||||
},
|
||||
|
||||
'ReleaseSIMMIPS': {
|
||||
# Should not inherit from Dart_Release (see DebugSIMMIPS).
|
||||
'inherit_from': ['Dart_Base', 'Dart_simmips_Base'],
|
||||
'defines': [
|
||||
'NDEBUG',
|
||||
],
|
||||
},
|
||||
|
||||
'DebugMIPS': {
|
||||
'inherit_from': ['Dart_Base', 'Dart_mips_Base', 'Dart_Debug'],
|
||||
},
|
||||
|
||||
'ReleaseMIPS': {
|
||||
'inherit_from': ['Dart_Base', 'Dart_mips_Base', 'Dart_Release'],
|
||||
},
|
||||
|
||||
# These targets assume that target_arch is passed in explicitly
|
||||
# by the containing project (e.g., chromium).
|
||||
'Debug': {
|
||||
|
|
|
@ -55,6 +55,19 @@
|
|||
],
|
||||
},
|
||||
|
||||
'Dart_simmips_Base': {
|
||||
'cflags': [ '-O3', '-m32', ],
|
||||
'ldflags': [ '-m32', ],
|
||||
},
|
||||
|
||||
'Dart_mips_Base': {
|
||||
'cflags': [
|
||||
'-march=mips32r2',
|
||||
'-mhard-float',
|
||||
'-fno-strict-overflow',
|
||||
],
|
||||
},
|
||||
|
||||
'Dart_Debug': {
|
||||
'cflags': [ '-O<(dart_debug_optimization_level)' ],
|
||||
},
|
||||
|
|
|
@ -108,7 +108,7 @@ is 'dart file.dart' and you specify special command
|
|||
'arch',
|
||||
'The architecture to run tests for',
|
||||
['-a', '--arch'],
|
||||
['all', 'ia32', 'x64', 'simarm'],
|
||||
['all', 'ia32', 'x64', 'simarm', 'simmips'],
|
||||
'ia32'),
|
||||
new _TestOptionSpecification(
|
||||
'system',
|
||||
|
|
Loading…
Reference in a new issue