| Index: SConstruct
|
| ===================================================================
|
| --- SConstruct (revision 1441)
|
| +++ SConstruct (working copy)
|
| @@ -68,6 +68,9 @@
|
| 'wordsize:64': {
|
| 'CCFLAGS': ['-m32'],
|
| 'LINKFLAGS': ['-m32']
|
| + },
|
| + 'prof:oprofile': {
|
| + 'CPPDEFINES': ['ENABLE_OPROFILE_AGENT']
|
| }
|
| },
|
| 'msvc': {
|
| @@ -129,7 +132,8 @@
|
| 'WARNINGFLAGS': ['/W3', '/WX', '/wd4355', '/wd4800']
|
| },
|
| 'library:shared': {
|
| - 'CPPDEFINES': ['BUILDING_V8_SHARED']
|
| + 'CPPDEFINES': ['BUILDING_V8_SHARED'],
|
| + 'LIBS': ['winmm', 'ws2_32']
|
| },
|
| 'arch:arm': {
|
| 'CPPDEFINES': ['ARM'],
|
| @@ -249,6 +253,10 @@
|
| },
|
| 'mode:debug': {
|
| 'CCFLAGS': ['-g', '-O0']
|
| + },
|
| + 'prof:oprofile': {
|
| + 'LIBPATH': ['/usr/lib32', '/usr/lib32/oprofile'],
|
| + 'LIBS': ['opagent']
|
| }
|
| },
|
| 'msvc': {
|
| @@ -362,7 +370,7 @@
|
| 'help': 'build using snapshots for faster start-up'
|
| },
|
| 'prof': {
|
| - 'values': ['on', 'off'],
|
| + 'values': ['on', 'off', 'oprofile'],
|
| 'default': 'off',
|
| 'help': 'enable profiling of build target'
|
| },
|
| @@ -435,6 +443,8 @@
|
| return False
|
| if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on':
|
| Abort("Profiling on windows only supported for static library.")
|
| + if env['prof'] == 'oprofile' and env['os'] != 'linux':
|
| + Abort("OProfile is only supported on Linux.")
|
| 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)." %
|
|
|