diff options
author | Ben Murdoch <benm@google.com> | 2012-04-12 10:51:47 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2012-04-16 16:41:38 +0100 |
commit | 3ef787dbeca8a5fb1086949cda830dccee07bfbd (patch) | |
tree | 0a22edd97aa148abffdd405c585b22213fccbc82 /SConstruct | |
parent | 85b71799222b55eb5dd74ea26efe0c64ab655c8c (diff) | |
download | android_external_v8-3ef787dbeca8a5fb1086949cda830dccee07bfbd.tar.gz android_external_v8-3ef787dbeca8a5fb1086949cda830dccee07bfbd.tar.bz2 android_external_v8-3ef787dbeca8a5fb1086949cda830dccee07bfbd.zip |
Merge V8 at 3.9.24.13
Bug: 5688872
Change-Id: Id0aa8d23375030494d3189c31774059c0f5398fc
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 79 |
1 files changed, 66 insertions, 13 deletions
@@ -1,4 +1,4 @@ -# Copyright 2011 the V8 project authors. All rights reserved. +# Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: @@ -33,6 +33,7 @@ import os from os.path import join, dirname, abspath from types import DictType, StringTypes root_dir = dirname(File('SConstruct').rfile().abspath) +src_dir = join(root_dir, 'src') sys.path.insert(0, join(root_dir, 'tools')) import js2c, utils @@ -53,7 +54,7 @@ GCC_DTOA_EXTRA_CCFLAGS = [] LIBRARY_FLAGS = { 'all': { - 'CPPPATH': [join(root_dir, 'src')], + 'CPPPATH': [src_dir], 'regexp:interpreted': { 'CPPDEFINES': ['V8_INTERPRETED_REGEXP'] }, @@ -111,13 +112,13 @@ LIBRARY_FLAGS = { } }, 'os:freebsd': { - 'CPPPATH' : ['/usr/local/include'], + 'CPPPATH' : [src_dir, '/usr/local/include'], 'LIBPATH' : ['/usr/local/lib'], 'CCFLAGS': ['-ansi'], 'LIBS': ['execinfo'] }, 'os:openbsd': { - 'CPPPATH' : ['/usr/local/include'], + 'CPPPATH' : [src_dir, '/usr/local/include'], 'LIBPATH' : ['/usr/local/lib'], 'CCFLAGS': ['-ansi'], }, @@ -125,10 +126,14 @@ LIBRARY_FLAGS = { # On Solaris, to get isinf, INFINITY, fpclassify and other macros one # needs to define __C99FEATURES__. 'CPPDEFINES': ['__C99FEATURES__'], - 'CPPPATH' : ['/usr/local/include'], + 'CPPPATH' : [src_dir, '/usr/local/include'], 'LIBPATH' : ['/usr/local/lib'], 'CCFLAGS': ['-ansi'], }, + 'os:netbsd': { + 'CPPPATH' : [src_dir, '/usr/pkg/include'], + 'LIBPATH' : ['/usr/pkg/lib'], + }, 'os:win32': { 'CCFLAGS': ['-DWIN32'], 'CXXFLAGS': ['-DWIN32'], @@ -180,6 +185,9 @@ LIBRARY_FLAGS = { 'mips_arch_variant:mips32r2': { 'CPPDEFINES': ['_MIPS_ARCH_MIPS32R2'] }, + 'mips_arch_variant:loongson': { + 'CPPDEFINES': ['_MIPS_ARCH_LOONGSON'] + }, 'simulator:none': { 'CCFLAGS': ['-EL'], 'LINKFLAGS': ['-EL'], @@ -189,6 +197,9 @@ LIBRARY_FLAGS = { 'mips_arch_variant:mips32r1': { 'CCFLAGS': ['-mips32', '-Wa,-mips32'] }, + 'mips_arch_variant:loongson': { + 'CCFLAGS': ['-march=mips3', '-Wa,-march=mips3'] + }, 'library:static': { 'LINKFLAGS': ['-static', '-static-libgcc'] }, @@ -207,9 +218,12 @@ LIBRARY_FLAGS = { 'LINKFLAGS': ['-m32'], 'mipsabi:softfloat': { 'CPPDEFINES': ['__mips_soft_float=1'], + 'fpu:on': { + 'CPPDEFINES' : ['CAN_USE_FPU_INSTRUCTIONS'] + } }, 'mipsabi:hardfloat': { - 'CPPDEFINES': ['__mips_hard_float=1'], + 'CPPDEFINES': ['__mips_hard_float=1', 'CAN_USE_FPU_INSTRUCTIONS'], } }, 'arch:x64': { @@ -291,10 +305,16 @@ V8_EXTRA_FLAGS = { '-Werror', '-W', '-Wno-unused-parameter', + '-Woverloaded-virtual', '-Wnon-virtual-dtor'] }, 'os:win32': { - 'WARNINGFLAGS': ['-pedantic', '-Wno-long-long'] + 'WARNINGFLAGS': ['-pedantic', + '-Wno-long-long', + '-Wno-pedantic-ms-format'], + 'library:shared': { + 'LIBS': ['winmm', 'ws2_32'] + } }, 'os:linux': { 'WARNINGFLAGS': ['-pedantic'], @@ -364,6 +384,9 @@ MKSNAPSHOT_EXTRA_FLAGS = { 'os:win32': { 'LIBS': ['winmm', 'ws2_32'], }, + 'os:netbsd': { + 'LIBS': ['execinfo', 'pthread'] + }, 'compress_startup_data:bz2': { 'os:linux': { 'LIBS': ['bz2'] @@ -396,7 +419,7 @@ DTOA_EXTRA_FLAGS = { CCTEST_EXTRA_FLAGS = { 'all': { - 'CPPPATH': [join(root_dir, 'src')], + 'CPPPATH': [src_dir], 'library:shared': { 'CPPDEFINES': ['USING_V8_SHARED'] }, @@ -428,6 +451,9 @@ CCTEST_EXTRA_FLAGS = { 'os:win32': { 'LIBS': ['winmm', 'ws2_32'] }, + 'os:netbsd': { + 'LIBS': ['execinfo', 'pthread'] + }, 'arch:arm': { 'LINKFLAGS': ARM_LINK_FLAGS }, @@ -450,7 +476,7 @@ CCTEST_EXTRA_FLAGS = { SAMPLE_FLAGS = { 'all': { - 'CPPPATH': [join(abspath('.'), 'include')], + 'CPPPATH': [join(root_dir, 'include')], 'library:shared': { 'CPPDEFINES': ['USING_V8_SHARED'] }, @@ -487,6 +513,10 @@ SAMPLE_FLAGS = { 'os:win32': { 'LIBS': ['winmm', 'ws2_32'] }, + 'os:netbsd': { + 'LIBPATH' : ['/usr/pkg/lib'], + 'LIBS': ['execinfo', 'pthread'] + }, 'arch:arm': { 'LINKFLAGS': ARM_LINK_FLAGS, 'armeabi:soft' : { @@ -524,6 +554,9 @@ SAMPLE_FLAGS = { 'mips_arch_variant:mips32r2': { 'CPPDEFINES': ['_MIPS_ARCH_MIPS32R2'] }, + 'mips_arch_variant:loongson': { + 'CPPDEFINES': ['_MIPS_ARCH_LOONGSON'] + }, 'simulator:none': { 'CCFLAGS': ['-EL'], 'LINKFLAGS': ['-EL'], @@ -533,6 +566,9 @@ SAMPLE_FLAGS = { 'mips_arch_variant:mips32r1': { 'CCFLAGS': ['-mips32', '-Wa,-mips32'] }, + 'mips_arch_variant:loongson': { + 'CCFLAGS': ['-march=mips3', '-Wa,-march=mips3'] + }, 'library:static': { 'LINKFLAGS': ['-static', '-static-libgcc'] }, @@ -542,7 +578,10 @@ SAMPLE_FLAGS = { }, 'mipsabi:hardfloat': { 'CCFLAGS': ['-mhard-float'], - 'LINKFLAGS': ['-mhard-float'] + 'LINKFLAGS': ['-mhard-float'], + 'fpu:on': { + 'CPPDEFINES' : ['CAN_USE_FPU_INSTRUCTIONS'] + } } } }, @@ -629,7 +668,7 @@ SAMPLE_FLAGS = { PREPARSER_FLAGS = { 'all': { - 'CPPPATH': [join(abspath('.'), 'include'), join(abspath('.'), 'src')], + 'CPPPATH': [join(root_dir, 'include'), src_dir], 'library:shared': { 'CPPDEFINES': ['USING_V8_SHARED'] }, @@ -676,6 +715,9 @@ PREPARSER_FLAGS = { 'mips_arch_variant:mips32r2': { 'CPPDEFINES': ['_MIPS_ARCH_MIPS32R2'] }, + 'mips_arch_variant:loongson': { + 'CPPDEFINES': ['_MIPS_ARCH_LOONGSON'] + }, 'simulator:none': { 'CCFLAGS': ['-EL'], 'LINKFLAGS': ['-EL'], @@ -685,6 +727,9 @@ PREPARSER_FLAGS = { 'mips_arch_variant:mips32r1': { 'CCFLAGS': ['-mips32', '-Wa,-mips32'] }, + 'mips_arch_variant:loongson': { + 'CCFLAGS': ['-march=mips3', '-Wa,-march=mips3'] + }, 'library:static': { 'LINKFLAGS': ['-static', '-static-libgcc'] }, @@ -818,6 +863,9 @@ D8_FLAGS = { 'os:win32': { 'LIBS': ['winmm', 'ws2_32'], }, + 'os:netbsd': { + 'LIBS': ['pthread'], + }, 'arch:arm': { 'LINKFLAGS': ARM_LINK_FLAGS }, @@ -951,7 +999,7 @@ PLATFORM_OPTIONS = { 'help': 'the architecture to build for' }, 'os': { - 'values': ['freebsd', 'linux', 'macos', 'win32', 'openbsd', 'solaris', 'cygwin'], + 'values': ['freebsd', 'linux', 'macos', 'win32', 'openbsd', 'solaris', 'cygwin', 'netbsd'], 'guess': GuessOS, 'help': 'the os to build for' }, @@ -1090,7 +1138,7 @@ SIMPLE_OPTIONS = { 'help': 'generate calling conventiont according to selected mips ABI' }, 'mips_arch_variant': { - 'values': ['mips32r2', 'mips32r1'], + 'values': ['mips32r2', 'mips32r1', 'loongson'], 'default': 'mips32r2', 'help': 'mips variant' }, @@ -1104,6 +1152,11 @@ SIMPLE_OPTIONS = { 'default': 'on', 'help': 'use vfp3 instructions when building the snapshot [Arm only]' }, + 'fpu': { + 'values': ['on', 'off'], + 'default': 'on', + 'help': 'use fpu instructions when building the snapshot [MIPS only]' + }, } |