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

Side by Side Diff: SConstruct

Issue 11574031: Intel VTune integration for V8/D8 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years 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
OLDNEW
1 # Copyright 2012 the V8 project authors. All rights reserved. 1 # Copyright 2012 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 227 }
228 }, 228 },
229 'arch:x64': { 229 'arch:x64': {
230 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], 230 'CPPDEFINES': ['V8_TARGET_ARCH_X64'],
231 'CCFLAGS': ['-m64'], 231 'CCFLAGS': ['-m64'],
232 'LINKFLAGS': ['-m64'], 232 'LINKFLAGS': ['-m64'],
233 }, 233 },
234 'gdbjit:on': { 234 'gdbjit:on': {
235 'CPPDEFINES': ['ENABLE_GDB_JIT_INTERFACE'] 235 'CPPDEFINES': ['ENABLE_GDB_JIT_INTERFACE']
236 }, 236 },
237 'vtunejit:on': {
238 'CPPDEFINES': ['ENABLE_VTUNE_JIT_INTERFACE']
239 },
237 'compress_startup_data:bz2': { 240 'compress_startup_data:bz2': {
238 'CPPDEFINES': ['COMPRESS_STARTUP_DATA_BZ2'] 241 'CPPDEFINES': ['COMPRESS_STARTUP_DATA_BZ2']
239 } 242 }
240 }, 243 },
241 'msvc': { 244 'msvc': {
242 'all': { 245 'all': {
243 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], 246 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'],
244 'CXXFLAGS': ['/GR-', '/Gy'], 247 'CXXFLAGS': ['/GR-', '/Gy'],
245 'CPPDEFINES': ['WIN32'], 248 'CPPDEFINES': ['WIN32'],
246 'LINKFLAGS': ['/INCREMENTAL:NO', '/NXCOMPAT', '/IGNORE:4221'], 249 'LINKFLAGS': ['/INCREMENTAL:NO', '/NXCOMPAT', '/IGNORE:4221'],
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 'pgo:off': { 289 'pgo:off': {
287 'LINKFLAGS': ['/LTCG'], 290 'LINKFLAGS': ['/LTCG'],
288 }, 291 },
289 'pgo:instrument': { 292 'pgo:instrument': {
290 'LINKFLAGS': ['/LTCG:PGI'] 293 'LINKFLAGS': ['/LTCG:PGI']
291 }, 294 },
292 'pgo:optimize': { 295 'pgo:optimize': {
293 'LINKFLAGS': ['/LTCG:PGO'] 296 'LINKFLAGS': ['/LTCG:PGO']
294 } 297 }
295 } 298 }
299 },
300 'vtunejit:on': {
301 'CPPDEFINES': ['ENABLE_VTUNE_JIT_INTERFACE']
296 } 302 }
297 } 303 }
298 } 304 }
299 305
300 306
301 V8_EXTRA_FLAGS = { 307 V8_EXTRA_FLAGS = {
302 'gcc': { 308 'gcc': {
303 'all': { 309 'all': {
304 'WARNINGFLAGS': ['-Wall', 310 'WARNINGFLAGS': ['-Wall',
305 '-Werror', 311 '-Werror',
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 'CPPDEFINES': ['USING_V8_SHARED'] 487 'CPPDEFINES': ['USING_V8_SHARED']
482 }, 488 },
483 }, 489 },
484 'gcc': { 490 'gcc': {
485 'all': { 491 'all': {
486 'LIBPATH': ['.'], 492 'LIBPATH': ['.'],
487 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], 493 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'],
488 'CXXFLAGS': ['-fno-rtti', '-fno-exceptions'], 494 'CXXFLAGS': ['-fno-rtti', '-fno-exceptions'],
489 'LINKFLAGS': ['$CCFLAGS'], 495 'LINKFLAGS': ['$CCFLAGS'],
490 }, 496 },
497 'vtunejit:on': {
498 'LIBS': ['jitprofiling'],
499 },
491 'os:linux': { 500 'os:linux': {
492 'LIBS': ['pthread'], 501 'LIBS': ['pthread'],
493 }, 502 },
494 'os:macos': { 503 'os:macos': {
495 'LIBS': ['pthread'], 504 'LIBS': ['pthread'],
496 }, 505 },
497 'os:freebsd': { 506 'os:freebsd': {
498 'LIBPATH' : ['/usr/local/lib'], 507 'LIBPATH' : ['/usr/local/lib'],
499 'LIBS': ['execinfo', 'pthread'] 508 'LIBS': ['execinfo', 'pthread']
500 }, 509 },
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 'CPPDEFINES': ['COMPRESS_STARTUP_DATA_BZ2'], 613 'CPPDEFINES': ['COMPRESS_STARTUP_DATA_BZ2'],
605 'os:linux': { 614 'os:linux': {
606 'LIBS': ['bz2'] 615 'LIBS': ['bz2']
607 } 616 }
608 }, 617 },
609 }, 618 },
610 'msvc': { 619 'msvc': {
611 'all': { 620 'all': {
612 'LIBS': ['winmm', 'ws2_32'] 621 'LIBS': ['winmm', 'ws2_32']
613 }, 622 },
623 'vtunejit:on': {
624 'LIBS': ['jitprofiling'],
625 'LINKFLAGS': ['/DEBUG']
626 },
614 'verbose:off': { 627 'verbose:off': {
615 'CCFLAGS': ['/nologo'], 628 'CCFLAGS': ['/nologo'],
616 'LINKFLAGS': ['/NOLOGO'] 629 'LINKFLAGS': ['/NOLOGO']
617 }, 630 },
618 'verbose:on': { 631 'verbose:on': {
619 'LINKFLAGS': ['/VERBOSE'] 632 'LINKFLAGS': ['/VERBOSE']
620 }, 633 },
621 'prof:on': { 634 'prof:on': {
622 'LINKFLAGS': ['/MAP'] 635 'LINKFLAGS': ['/MAP']
623 }, 636 },
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 'prof': { 1037 'prof': {
1025 'values': ['on', 'off'], 1038 'values': ['on', 'off'],
1026 'default': 'off', 1039 'default': 'off',
1027 'help': 'enable profiling of build target' 1040 'help': 'enable profiling of build target'
1028 }, 1041 },
1029 'gdbjit': { 1042 'gdbjit': {
1030 'values': ['on', 'off'], 1043 'values': ['on', 'off'],
1031 'default': 'off', 1044 'default': 'off',
1032 'help': 'enable GDB JIT interface' 1045 'help': 'enable GDB JIT interface'
1033 }, 1046 },
1047 'vtunejit': {
1048 'values': ['on', 'off'],
1049 'default': 'off',
1050 'help': 'enable VTune JIT interface'
1051 },
1034 'library': { 1052 'library': {
1035 'values': ['static', 'shared'], 1053 'values': ['static', 'shared'],
1036 'default': 'static', 1054 'default': 'static',
1037 'help': 'the type of library to produce' 1055 'help': 'the type of library to produce'
1038 }, 1056 },
1039 'objectprint': { 1057 'objectprint': {
1040 'values': ['on', 'off'], 1058 'values': ['on', 'off'],
1041 'default': 'off', 1059 'default': 'off',
1042 'help': 'enable object printing' 1060 'help': 'enable object printing'
1043 }, 1061 },
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1294 if not IsLegal(env, 'mode', ['debug', 'release']): 1312 if not IsLegal(env, 'mode', ['debug', 'release']):
1295 return False 1313 return False
1296 if not IsLegal(env, 'sample', ["shell", "process", "lineprocessor"]): 1314 if not IsLegal(env, 'sample', ["shell", "process", "lineprocessor"]):
1297 return False 1315 return False
1298 if not IsLegal(env, 'regexp', ["native", "interpreted"]): 1316 if not IsLegal(env, 'regexp', ["native", "interpreted"]):
1299 return False 1317 return False
1300 if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on' : 1318 if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on' :
1301 Abort("Profiling on windows only supported for static library.") 1319 Abort("Profiling on windows only supported for static library.")
1302 if env['gdbjit'] == 'on' and ((env['os'] != 'linux' and env['os'] != 'macos') or (env['arch'] != 'ia32' and env['arch'] != 'x64' and env['arch'] != 'arm')): 1320 if env['gdbjit'] == 'on' and ((env['os'] != 'linux' and env['os'] != 'macos') or (env['arch'] != 'ia32' and env['arch'] != 'x64' and env['arch'] != 'arm')):
1303 Abort("GDBJIT interface is supported only for Intel-compatible (ia32 or x64) Linux/OSX target.") 1321 Abort("GDBJIT interface is supported only for Intel-compatible (ia32 or x64) Linux/OSX target.")
1322 if env['vtunejit'] == 'on' and (env['arch'] != 'ia32' and env['arch'] != 'x64' ):
1323 Abort("VTUNEJIT interface is supported only for Intel architectures (ia32 or x64)")
1304 if env['os'] == 'win32' and env['soname'] == 'on': 1324 if env['os'] == 'win32' and env['soname'] == 'on':
1305 Abort("Shared Object soname not applicable for Windows.") 1325 Abort("Shared Object soname not applicable for Windows.")
1306 if env['soname'] == 'on' and env['library'] == 'static': 1326 if env['soname'] == 'on' and env['library'] == 'static':
1307 Abort("Shared Object soname not applicable for static library.") 1327 Abort("Shared Object soname not applicable for static library.")
1308 if env['os'] != 'win32' and env['pgo'] != 'off': 1328 if env['os'] != 'win32' and env['pgo'] != 'off':
1309 Abort("Profile guided optimization only supported on Windows.") 1329 Abort("Profile guided optimization only supported on Windows.")
1310 if env['cache'] and not os.path.isdir(env['cache']): 1330 if env['cache'] and not os.path.isdir(env['cache']):
1311 Abort("The specified cache directory does not exist.") 1331 Abort("The specified cache directory does not exist.")
1312 if not (env['arch'] == 'arm' or env['simulator'] == 'arm') and ('unalignedacce sses' in ARGUMENTS): 1332 if not (env['arch'] == 'arm' or env['simulator'] == 'arm') and ('unalignedacce sses' in ARGUMENTS):
1313 print env['arch'] 1333 print env['arch']
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1627 # env.Copy without getting warnings for compatibility with older 1647 # env.Copy without getting warnings for compatibility with older
1628 # version of scons. Also, there's a bug in some revisions that 1648 # version of scons. Also, there's a bug in some revisions that
1629 # doesn't allow this flag to be set, so we swallow any exceptions. 1649 # doesn't allow this flag to be set, so we swallow any exceptions.
1630 # Lovely. 1650 # Lovely.
1631 try: 1651 try:
1632 SetOption('warn', 'no-deprecated') 1652 SetOption('warn', 'no-deprecated')
1633 except: 1653 except:
1634 pass 1654 pass
1635 1655
1636 Build() 1656 Build()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698