Chromium Code Reviews| Index: SConstruct |
| diff --git a/SConstruct b/SConstruct |
| index c107ab694f5cadccd5b45eeea3ff03f10384c712..b33a6a8673d47530b26b9050d82303b40592563a 100644 |
| --- a/SConstruct |
| +++ b/SConstruct |
| @@ -131,13 +131,28 @@ LIBRARY_FLAGS = { |
| '-Wstrict-aliasing=2'], |
| 'CPPPATH': ANDROID_INCLUDES, |
| }, |
| - 'wordsize:64': { |
| + 'wordsize:32': { |
| 'CCFLAGS': ['-m32'], |
| + 'CPPDEFINES': ['ILP32'], |
| 'LINKFLAGS': ['-m32'] |
| }, |
| + 'wordsize:64': { |
| + 'CCFLAGS': ['-m64'], |
| + 'CPPDEFINES': ['LP64'], |
| + 'LINKFLAGS': ['-m64'] |
| + }, |
| + 'arch:ia32': { |
| + 'CPPDEFINES': ['V8_ARCH_IA32'] |
| + }, |
| + 'arch:arm': { |
| + 'CPPDEFINES': ['V8_ARCH_ARM'] |
| + }, |
| + 'arch:x64': { |
| + 'CPPDEFINES': ['V8_ARCH_X64'] |
| + }, |
| 'prof:oprofile': { |
| 'CPPDEFINES': ['ENABLE_OPROFILE_AGENT'] |
| - } |
| + }, |
|
Mads Ager (chromium)
2009/04/29 12:27:24
Is this comma needed?
Lasse Reichstein
2009/04/29 13:05:41
Not needed. I would prefer to have it everywhere (
|
| }, |
| 'msvc': { |
| 'all': { |
| @@ -190,7 +205,7 @@ V8_EXTRA_FLAGS = { |
| 'arch:arm': { |
| 'CPPDEFINES': ['ARM'] |
| }, |
| - 'arch:android': { |
| + 'os:android': { |
| 'CPPDEFINES': ['ARM'] |
| }, |
| 'os:win32': { |
| @@ -298,10 +313,16 @@ CCTEST_EXTRA_FLAGS = { |
| 'CPPDEFINES': ['SK_RELEASE', 'NDEBUG'] |
| } |
| }, |
| - 'wordsize:64': { |
| + 'wordsize:32': { |
| 'CCFLAGS': ['-m32'], |
| + 'CPPDEFINES': ['ILP32'], |
| 'LINKFLAGS': ['-m32'] |
| }, |
| + 'wordsize:64': { |
| + 'CCFLAGS': ['-m64'], |
| + 'CPPDEFINES': ['LP64'], |
| + 'LINKFLAGS': ['-m64'] |
| + }, |
| }, |
| 'msvc': { |
| 'all': { |
| @@ -349,10 +370,16 @@ SAMPLE_FLAGS = { |
| 'CPPDEFINES': ['SK_RELEASE', 'NDEBUG'] |
| } |
| }, |
| - 'wordsize:64': { |
| + 'wordsize:32': { |
| 'CCFLAGS': ['-m32'], |
| + 'CPPDEFINES': ['ILP32'], |
| 'LINKFLAGS': ['-m32'] |
| }, |
| + 'wordsize:64': { |
| + 'CCFLAGS': ['-m64'], |
| + 'CPPDEFINES': ['LP64'], |
| + 'LINKFLAGS': ['-m64'] |
| + }, |
| 'mode:release': { |
| 'CCFLAGS': ['-O2'] |
| }, |
| @@ -466,17 +493,17 @@ SIMPLE_OPTIONS = { |
| 'toolchain': { |
| 'values': ['gcc', 'msvc'], |
| 'default': TOOLCHAIN_GUESS, |
| - 'help': 'the toolchain to use' |
| + 'help': 'the toolchain to use (' + TOOLCHAIN_GUESS + ')' |
| }, |
| 'os': { |
| 'values': ['freebsd', 'linux', 'macos', 'win32', 'android'], |
| 'default': OS_GUESS, |
| - 'help': 'the os to build for' |
| + 'help': 'the os to build for (' + OS_GUESS + ')' |
| }, |
| 'arch': { |
| - 'values':['arm', 'ia32'], |
| + 'values':['arm', 'ia32', 'x64'], |
| 'default': ARCH_GUESS, |
| - 'help': 'the architecture to build for' |
| + 'help': 'the architecture to build for (' + ARCH_GUESS + ')' |
| }, |
| 'snapshot': { |
| 'values': ['on', 'off', 'nobuild'], |
| @@ -505,7 +532,7 @@ SIMPLE_OPTIONS = { |
| }, |
| 'wordsize': { |
| 'values': ['64', '32'], |
| - 'default': WORDSIZE_GUESS, |
| + 'default': '32', # WORDSIZE_GUESS, |
| 'help': 'the word size' |
| }, |
| 'simulator': { |
| @@ -527,7 +554,7 @@ SIMPLE_OPTIONS = { |
| 'values': ['dumb', 'readline'], |
| 'default': 'dumb', |
| 'help': 'the console to use for the d8 shell' |
| - } |
| + }, |
|
Mads Ager (chromium)
2009/04/29 12:27:24
comma needed?
|
| } |
| @@ -565,6 +592,8 @@ def VerifyOptions(env): |
| Abort("Profiling on windows only supported for static library.") |
| if env['prof'] == 'oprofile' and env['os'] != 'linux': |
| Abort("OProfile is only supported on Linux.") |
| + if env['wordsize'] == '64' and (env['os'] != 'linux' or env['arch'] != 'x64'): |
| + Abort("64 bit compilation only allowed on Linux OS and x64 architecture.") |
| for (name, option) in SIMPLE_OPTIONS.iteritems(): |
| if (not option.get('default')) and (name not in ARGUMENTS): |
| message = ("A value for option %s must be specified (%s)." % |