Commit ef9b0a8e authored by sgjesse@chromium.org's avatar sgjesse@chromium.org

Added a profiling option (prof) to the SCons build. Currently

it just makes the linker generate a MAP file for the shell
sample on Windows.
Review URL: http://codereview.chromium.org/4064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@367 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b0a79ce1
......@@ -201,6 +201,9 @@ SAMPLE_FLAGS = {
'library:shared': {
'CPPDEFINES': ['USING_V8_SHARED']
},
'prof:on': {
'LINKFLAGS': ['/MAP']
},
'mode:release': {
'CCFLAGS': ['/Ox', '/MT', '/GF'],
'LINKFLAGS': ['/OPT:REF', '/OPT:ICF']
......@@ -280,6 +283,11 @@ SIMPLE_OPTIONS = {
'default': 'off',
'help': 'build using snapshots for faster start-up'
},
'prof': {
'values': ['on', 'off'],
'default': 'off',
'help': 'enable profiling of build target'
},
'library': {
'values': ['static', 'shared'],
'default': 'static',
......@@ -337,6 +345,8 @@ def VerifyOptions(env):
return False
if not IsLegal(env, 'sample', ["shell", "process"]):
return False
if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on':
Abort("Profiling on windows only supported for static library.")
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)." %
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment