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

Side by Side Diff: SConstruct

Issue 39179: Adding support for reporting addresses of JIT compiled code to OProfile (Closed)
Patch Set: Fixes according to Kasper's comments Created 11 years, 9 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
« no previous file with comments | « no previous file | src/SConscript » ('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 2008 the V8 project authors. All rights reserved. 1 # Copyright 2008 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 'os:freebsd': { 61 'os:freebsd': {
62 'CCFLAGS': ['-ansi'], 62 'CCFLAGS': ['-ansi'],
63 }, 63 },
64 'os:win32': { 64 'os:win32': {
65 'CCFLAGS': ['-DWIN32'], 65 'CCFLAGS': ['-DWIN32'],
66 'CXXFLAGS': ['-DWIN32'], 66 'CXXFLAGS': ['-DWIN32'],
67 }, 67 },
68 'wordsize:64': { 68 'wordsize:64': {
69 'CCFLAGS': ['-m32'], 69 'CCFLAGS': ['-m32'],
70 'LINKFLAGS': ['-m32'] 70 'LINKFLAGS': ['-m32']
71 },
72 'prof:oprofile': {
73 'CPPDEFINES': ['ENABLE_OPROFILE_AGENT']
71 } 74 }
72 }, 75 },
73 'msvc': { 76 'msvc': {
74 'all': { 77 'all': {
75 'DIALECTFLAGS': ['/nologo'], 78 'DIALECTFLAGS': ['/nologo'],
76 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], 79 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'],
77 'CXXFLAGS': ['$CCFLAGS', '/GR-', '/Gy'], 80 'CXXFLAGS': ['$CCFLAGS', '/GR-', '/Gy'],
78 'CPPDEFINES': ['WIN32', '_USE_32BIT_TIME_T', 'PCRE_STATIC'], 81 'CPPDEFINES': ['WIN32', '_USE_32BIT_TIME_T', 'PCRE_STATIC'],
79 'LINKFLAGS': ['/NOLOGO', '/MACHINE:X86', '/INCREMENTAL:NO', 82 'LINKFLAGS': ['/NOLOGO', '/MACHINE:X86', '/INCREMENTAL:NO',
80 '/NXCOMPAT', '/IGNORE:4221'], 83 '/NXCOMPAT', '/IGNORE:4221'],
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 }, 245 },
243 'wordsize:64': { 246 'wordsize:64': {
244 'CCFLAGS': ['-m32'], 247 'CCFLAGS': ['-m32'],
245 'LINKFLAGS': ['-m32'] 248 'LINKFLAGS': ['-m32']
246 }, 249 },
247 'mode:release': { 250 'mode:release': {
248 'CCFLAGS': ['-O2'] 251 'CCFLAGS': ['-O2']
249 }, 252 },
250 'mode:debug': { 253 'mode:debug': {
251 'CCFLAGS': ['-g', '-O0'] 254 'CCFLAGS': ['-g', '-O0']
255 },
256 'prof:oprofile': {
257 'LIBPATH': ['/usr/lib32', '/usr/lib32/oprofile'],
258 'LIBS': ['opagent']
252 } 259 }
253 }, 260 },
254 'msvc': { 261 'msvc': {
255 'all': { 262 'all': {
256 'CCFLAGS': ['/nologo'], 263 'CCFLAGS': ['/nologo'],
257 'LINKFLAGS': ['/nologo'], 264 'LINKFLAGS': ['/nologo'],
258 'LIBS': ['winmm', 'ws2_32'] 265 'LIBS': ['winmm', 'ws2_32']
259 }, 266 },
260 'library:shared': { 267 'library:shared': {
261 'CPPDEFINES': ['USING_V8_SHARED'] 268 'CPPDEFINES': ['USING_V8_SHARED']
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 'values':['arm', 'ia32'], 362 'values':['arm', 'ia32'],
356 'default': ARCH_GUESS, 363 'default': ARCH_GUESS,
357 'help': 'the architecture to build for' 364 'help': 'the architecture to build for'
358 }, 365 },
359 'snapshot': { 366 'snapshot': {
360 'values': ['on', 'off', 'nobuild'], 367 'values': ['on', 'off', 'nobuild'],
361 'default': 'off', 368 'default': 'off',
362 'help': 'build using snapshots for faster start-up' 369 'help': 'build using snapshots for faster start-up'
363 }, 370 },
364 'prof': { 371 'prof': {
365 'values': ['on', 'off'], 372 'values': ['on', 'off', 'oprofile'],
366 'default': 'off', 373 'default': 'off',
367 'help': 'enable profiling of build target' 374 'help': 'enable profiling of build target'
368 }, 375 },
369 'library': { 376 'library': {
370 'values': ['static', 'shared'], 377 'values': ['static', 'shared'],
371 'default': 'static', 378 'default': 'static',
372 'help': 'the type of library to produce' 379 'help': 'the type of library to produce'
373 }, 380 },
374 'msvcrt': { 381 'msvcrt': {
375 'values': ['static', 'shared'], 382 'values': ['static', 'shared'],
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 return True 435 return True
429 436
430 437
431 def VerifyOptions(env): 438 def VerifyOptions(env):
432 if not IsLegal(env, 'mode', ['debug', 'release']): 439 if not IsLegal(env, 'mode', ['debug', 'release']):
433 return False 440 return False
434 if not IsLegal(env, 'sample', ["shell", "process"]): 441 if not IsLegal(env, 'sample', ["shell", "process"]):
435 return False 442 return False
436 if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on' : 443 if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on' :
437 Abort("Profiling on windows only supported for static library.") 444 Abort("Profiling on windows only supported for static library.")
445 if env['prof'] == 'oprofile' and env['os'] != 'linux':
446 Abort("OProfile is only supported on Linux.")
438 for (name, option) in SIMPLE_OPTIONS.iteritems(): 447 for (name, option) in SIMPLE_OPTIONS.iteritems():
439 if (not option.get('default')) and (name not in ARGUMENTS): 448 if (not option.get('default')) and (name not in ARGUMENTS):
440 message = ("A value for option %s must be specified (%s)." % 449 message = ("A value for option %s must be specified (%s)." %
441 (name, ", ".join(option['values']))) 450 (name, ", ".join(option['values'])))
442 Abort(message) 451 Abort(message)
443 if not env[name] in option['values']: 452 if not env[name] in option['values']:
444 message = ("Unknown %s value '%s'. Possible values are (%s)." % 453 message = ("Unknown %s value '%s'. Possible values are (%s)." %
445 (name, env[name], ", ".join(option['values']))) 454 (name, env[name], ", ".join(option['values'])))
446 Abort(message) 455 Abort(message)
447 456
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 # version of scons. Also, there's a bug in some revisions that 667 # version of scons. Also, there's a bug in some revisions that
659 # doesn't allow this flag to be set, so we swallow any exceptions. 668 # doesn't allow this flag to be set, so we swallow any exceptions.
660 # Lovely. 669 # Lovely.
661 try: 670 try:
662 SetOption('warn', 'no-deprecated') 671 SetOption('warn', 'no-deprecated')
663 except: 672 except:
664 pass 673 pass
665 674
666 675
667 Build() 676 Build()
OLDNEW
« no previous file with comments | « no previous file | src/SConscript » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698