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

Side by Side Diff: SConstruct

Issue 6597029: [Isolates] Merge r 6300:6500 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « MERGE ('k') | include/v8.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2010 the V8 project authors. All rights reserved. 1 # Copyright 2010 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 14 matching lines...) Expand all
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 import platform 28 import platform
29 import re 29 import re
30 import sys 30 import sys
31 import os 31 import os
32 from os.path import join, dirname, abspath 32 from os.path import join, dirname, abspath
33 from types import DictType, StringTypes 33 from types import DictType, StringTypes
34 root_dir = dirname(File('SConstruct').rfile().abspath) 34 root_dir = dirname(File('SConstruct').rfile().abspath)
35 sys.path.append(join(root_dir, 'tools')) 35 sys.path.insert(0, join(root_dir, 'tools'))
36 import js2c, utils 36 import js2c, utils
37 37
38 # ANDROID_TOP is the top of the Android checkout, fetched from the environment 38 # ANDROID_TOP is the top of the Android checkout, fetched from the environment
39 # variable 'TOP'. You will also need to set the CXX, CC, AR and RANLIB 39 # variable 'TOP'. You will also need to set the CXX, CC, AR and RANLIB
40 # environment variables to the cross-compiling tools. 40 # environment variables to the cross-compiling tools.
41 ANDROID_TOP = os.environ.get('TOP') 41 ANDROID_TOP = os.environ.get('TOP')
42 if ANDROID_TOP is None: 42 if ANDROID_TOP is None:
43 ANDROID_TOP="" 43 ANDROID_TOP=""
44 44
45 # ARM_TARGET_LIB is the path to the dynamic library to use on the target 45 # ARM_TARGET_LIB is the path to the dynamic library to use on the target
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 'CPPDEFINES': ['OBJECT_PRINT'], 117 'CPPDEFINES': ['OBJECT_PRINT'],
118 }, 118 },
119 'protectheap:on': { 119 'protectheap:on': {
120 'CPPDEFINES': ['ENABLE_VMSTATE_TRACKING', 'ENABLE_HEAP_PROTECTION'], 120 'CPPDEFINES': ['ENABLE_VMSTATE_TRACKING', 'ENABLE_HEAP_PROTECTION'],
121 }, 121 },
122 'profilingsupport:on': { 122 'profilingsupport:on': {
123 'CPPDEFINES': ['ENABLE_VMSTATE_TRACKING', 'ENABLE_LOGGING_AND_PROFILING' ], 123 'CPPDEFINES': ['ENABLE_VMSTATE_TRACKING', 'ENABLE_LOGGING_AND_PROFILING' ],
124 }, 124 },
125 'debuggersupport:on': { 125 'debuggersupport:on': {
126 'CPPDEFINES': ['ENABLE_DEBUGGER_SUPPORT'], 126 'CPPDEFINES': ['ENABLE_DEBUGGER_SUPPORT'],
127 },
128 'inspector:on': {
129 'CPPDEFINES': ['INSPECTOR'],
130 },
131 'liveobjectlist:on': {
132 'CPPDEFINES': ['ENABLE_DEBUGGER_SUPPORT', 'INSPECTOR',
133 'LIVE_OBJECT_LIST', 'OBJECT_PRINT'],
127 } 134 }
128 }, 135 },
129 'gcc': { 136 'gcc': {
130 'all': { 137 'all': {
131 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], 138 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'],
132 'CXXFLAGS': ['$CCFLAGS', '-fno-rtti', '-fno-exceptions'], 139 'CXXFLAGS': ['$CCFLAGS', '-fno-rtti', '-fno-exceptions'],
133 }, 140 },
134 'visibility:hidden': { 141 'visibility:hidden': {
135 # Use visibility=default to disable this. 142 # Use visibility=default to disable this.
136 'CXXFLAGS': ['-fvisibility=hidden'] 143 'CXXFLAGS': ['-fvisibility=hidden']
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 'CCFLAGS': ['-m32'], 229 'CCFLAGS': ['-m32'],
223 'LINKFLAGS': ['-m32'], 230 'LINKFLAGS': ['-m32'],
224 }, 231 },
225 'arch:x64': { 232 'arch:x64': {
226 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], 233 'CPPDEFINES': ['V8_TARGET_ARCH_X64'],
227 'CCFLAGS': ['-m64'], 234 'CCFLAGS': ['-m64'],
228 'LINKFLAGS': ['-m64'], 235 'LINKFLAGS': ['-m64'],
229 }, 236 },
230 'prof:oprofile': { 237 'prof:oprofile': {
231 'CPPDEFINES': ['ENABLE_OPROFILE_AGENT'] 238 'CPPDEFINES': ['ENABLE_OPROFILE_AGENT']
239 },
240 'gdbjit:on': {
241 'CPPDEFINES': ['ENABLE_GDB_JIT_INTERFACE']
232 } 242 }
233 }, 243 },
234 'msvc': { 244 'msvc': {
235 'all': { 245 'all': {
236 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], 246 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'],
237 'CXXFLAGS': ['$CCFLAGS', '/GR-', '/Gy'], 247 'CXXFLAGS': ['$CCFLAGS', '/GR-', '/Gy'],
238 'CPPDEFINES': ['WIN32'], 248 'CPPDEFINES': ['WIN32'],
239 'LINKFLAGS': ['/INCREMENTAL:NO', '/NXCOMPAT', '/IGNORE:4221'], 249 'LINKFLAGS': ['/INCREMENTAL:NO', '/NXCOMPAT', '/IGNORE:4221'],
240 'CCPDBFLAGS': ['/Zi'] 250 'CCPDBFLAGS': ['/Zi']
241 }, 251 },
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 }, 323 },
314 'os:macos': { 324 'os:macos': {
315 'WARNINGFLAGS': ['-pedantic'] 325 'WARNINGFLAGS': ['-pedantic']
316 }, 326 },
317 'disassembler:on': { 327 'disassembler:on': {
318 'CPPDEFINES': ['ENABLE_DISASSEMBLER'] 328 'CPPDEFINES': ['ENABLE_DISASSEMBLER']
319 } 329 }
320 }, 330 },
321 'msvc': { 331 'msvc': {
322 'all': { 332 'all': {
323 'WARNINGFLAGS': ['/W3', '/WX', '/wd4355', '/wd4800'] 333 'WARNINGFLAGS': ['/W3', '/WX', '/wd4351', '/wd4355', '/wd4800']
324 }, 334 },
325 'library:shared': { 335 'library:shared': {
326 'CPPDEFINES': ['BUILDING_V8_SHARED'], 336 'CPPDEFINES': ['BUILDING_V8_SHARED'],
327 'LIBS': ['winmm', 'ws2_32'] 337 'LIBS': ['winmm', 'ws2_32']
328 }, 338 },
329 'arch:arm': { 339 'arch:arm': {
330 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'], 340 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'],
331 # /wd4996 is to silence the warning about sscanf 341 # /wd4996 is to silence the warning about sscanf
332 # used by the arm simulator. 342 # used by the arm simulator.
333 'WARNINGFLAGS': ['/wd4996'] 343 'WARNINGFLAGS': ['/wd4996']
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 'snapshot': { 709 'snapshot': {
700 'values': ['on', 'off', 'nobuild'], 710 'values': ['on', 'off', 'nobuild'],
701 'default': 'off', 711 'default': 'off',
702 'help': 'build using snapshots for faster start-up' 712 'help': 'build using snapshots for faster start-up'
703 }, 713 },
704 'prof': { 714 'prof': {
705 'values': ['on', 'off', 'oprofile'], 715 'values': ['on', 'off', 'oprofile'],
706 'default': 'off', 716 'default': 'off',
707 'help': 'enable profiling of build target' 717 'help': 'enable profiling of build target'
708 }, 718 },
719 'gdbjit': {
720 'values': ['on', 'off'],
721 'default': 'off',
722 'help': 'enable GDB JIT interface'
723 },
709 'library': { 724 'library': {
710 'values': ['static', 'shared'], 725 'values': ['static', 'shared'],
711 'default': 'static', 726 'default': 'static',
712 'help': 'the type of library to produce' 727 'help': 'the type of library to produce'
713 }, 728 },
714 'vmstate': { 729 'vmstate': {
715 'values': ['on', 'off'], 730 'values': ['on', 'off'],
716 'default': 'off', 731 'default': 'off',
717 'help': 'enable VM state tracking' 732 'help': 'enable VM state tracking'
718 }, 733 },
(...skipping 10 matching lines...) Expand all
729 'profilingsupport': { 744 'profilingsupport': {
730 'values': ['on', 'off'], 745 'values': ['on', 'off'],
731 'default': 'on', 746 'default': 'on',
732 'help': 'enable profiling of JavaScript code' 747 'help': 'enable profiling of JavaScript code'
733 }, 748 },
734 'debuggersupport': { 749 'debuggersupport': {
735 'values': ['on', 'off'], 750 'values': ['on', 'off'],
736 'default': 'on', 751 'default': 'on',
737 'help': 'enable debugging of JavaScript code' 752 'help': 'enable debugging of JavaScript code'
738 }, 753 },
754 'inspector': {
755 'values': ['on', 'off'],
756 'default': 'off',
757 'help': 'enable inspector features'
758 },
759 'liveobjectlist': {
760 'values': ['on', 'off'],
761 'default': 'off',
762 'help': 'enable live object list features in the debugger'
763 },
739 'soname': { 764 'soname': {
740 'values': ['on', 'off'], 765 'values': ['on', 'off'],
741 'default': 'off', 766 'default': 'off',
742 'help': 'turn on setting soname for Linux shared library' 767 'help': 'turn on setting soname for Linux shared library'
743 }, 768 },
744 'msvcrt': { 769 'msvcrt': {
745 'values': ['static', 'shared'], 770 'values': ['static', 'shared'],
746 'default': 'static', 771 'default': 'static',
747 'help': 'the type of Microsoft Visual C++ runtime library to use' 772 'help': 'the type of Microsoft Visual C++ runtime library to use'
748 }, 773 },
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 890
866 def VerifyOptions(env): 891 def VerifyOptions(env):
867 if not IsLegal(env, 'mode', ['debug', 'release']): 892 if not IsLegal(env, 'mode', ['debug', 'release']):
868 return False 893 return False
869 if not IsLegal(env, 'sample', ["shell", "process", "lineprocessor"]): 894 if not IsLegal(env, 'sample', ["shell", "process", "lineprocessor"]):
870 return False 895 return False
871 if not IsLegal(env, 'regexp', ["native", "interpreted"]): 896 if not IsLegal(env, 'regexp', ["native", "interpreted"]):
872 return False 897 return False
873 if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on' : 898 if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on' :
874 Abort("Profiling on windows only supported for static library.") 899 Abort("Profiling on windows only supported for static library.")
900 if env['gdbjit'] == 'on' and (env['os'] != 'linux' or (env['arch'] != 'ia32' a nd env['arch'] != 'x64')):
901 Abort("GDBJIT interface is supported only for Intel-compatible (ia32 or x64) Linux target.")
875 if env['prof'] == 'oprofile' and env['os'] != 'linux': 902 if env['prof'] == 'oprofile' and env['os'] != 'linux':
876 Abort("OProfile is only supported on Linux.") 903 Abort("OProfile is only supported on Linux.")
877 if env['os'] == 'win32' and env['soname'] == 'on': 904 if env['os'] == 'win32' and env['soname'] == 'on':
878 Abort("Shared Object soname not applicable for Windows.") 905 Abort("Shared Object soname not applicable for Windows.")
879 if env['soname'] == 'on' and env['library'] == 'static': 906 if env['soname'] == 'on' and env['library'] == 'static':
880 Abort("Shared Object soname not applicable for static library.") 907 Abort("Shared Object soname not applicable for static library.")
881 if env['os'] != 'win32' and env['pgo'] != 'off': 908 if env['os'] != 'win32' and env['pgo'] != 'off':
882 Abort("Profile guided optimization only supported on Windows.") 909 Abort("Profile guided optimization only supported on Windows.")
883 if env['cache'] and not os.path.isdir(env['cache']): 910 if env['cache'] and not os.path.isdir(env['cache']):
884 Abort("The specified cache directory does not exist.") 911 Abort("The specified cache directory does not exist.")
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 options['profilingsupport'] = 'on' 1011 options['profilingsupport'] = 'on'
985 if os == 'win32' and options['pgo'] != 'off' and options['msvcltcg'] == 'off': 1012 if os == 'win32' and options['pgo'] != 'off' and options['msvcltcg'] == 'off':
986 if 'msvcltcg' in ARGUMENTS: 1013 if 'msvcltcg' in ARGUMENTS:
987 print "Warning: forcing msvcltcg on as it is required for pgo (%s)" % opti ons['pgo'] 1014 print "Warning: forcing msvcltcg on as it is required for pgo (%s)" % opti ons['pgo']
988 options['msvcltcg'] = 'on' 1015 options['msvcltcg'] = 'on'
989 if options['arch'] == 'mips': 1016 if options['arch'] == 'mips':
990 if ('regexp' in ARGUMENTS) and options['regexp'] == 'native': 1017 if ('regexp' in ARGUMENTS) and options['regexp'] == 'native':
991 # Print a warning if native regexp is specified for mips 1018 # Print a warning if native regexp is specified for mips
992 print "Warning: forcing regexp to interpreted for mips" 1019 print "Warning: forcing regexp to interpreted for mips"
993 options['regexp'] = 'interpreted' 1020 options['regexp'] = 'interpreted'
1021 if options['liveobjectlist'] == 'on':
1022 if (options['debuggersupport'] != 'on') or (options['mode'] == 'release'):
1023 # Print a warning that liveobjectlist will implicitly enable the debugger
1024 print "Warning: forcing debuggersupport on for liveobjectlist"
1025 options['debuggersupport'] = 'on'
1026 options['inspector'] = 'on'
1027 options['objectprint'] = 'on'
994 1028
995 1029
996 def ParseEnvOverrides(arg, imports): 1030 def ParseEnvOverrides(arg, imports):
997 # The environment overrides are in the format NAME0:value0,NAME1:value1,... 1031 # The environment overrides are in the format NAME0:value0,NAME1:value1,...
998 # The environment imports are in the format NAME0,NAME1,... 1032 # The environment imports are in the format NAME0,NAME1,...
999 overrides = {} 1033 overrides = {}
1000 for var in imports.split(','): 1034 for var in imports.split(','):
1001 if var in os.environ: 1035 if var in os.environ:
1002 overrides[var] = os.environ[var] 1036 overrides[var] = os.environ[var]
1003 for override in arg.split(','): 1037 for override in arg.split(','):
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 # version of scons. Also, there's a bug in some revisions that 1192 # version of scons. Also, there's a bug in some revisions that
1159 # doesn't allow this flag to be set, so we swallow any exceptions. 1193 # doesn't allow this flag to be set, so we swallow any exceptions.
1160 # Lovely. 1194 # Lovely.
1161 try: 1195 try:
1162 SetOption('warn', 'no-deprecated') 1196 SetOption('warn', 'no-deprecated')
1163 except: 1197 except:
1164 pass 1198 pass
1165 1199
1166 1200
1167 Build() 1201 Build()
OLDNEW
« no previous file with comments | « MERGE ('k') | include/v8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698