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

Side by Side Diff: SConstruct

Issue 4064: Added a profiling option (prof) to the SCons build. Currently... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 3 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 | « no previous file | no next file » | 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 'CCFLAGS': ['-g', '-O0'] 194 'CCFLAGS': ['-g', '-O0']
195 } 195 }
196 }, 196 },
197 'msvc': { 197 'msvc': {
198 'all': { 198 'all': {
199 'CCFLAGS': ['/nologo'], 199 'CCFLAGS': ['/nologo'],
200 }, 200 },
201 'library:shared': { 201 'library:shared': {
202 'CPPDEFINES': ['USING_V8_SHARED'] 202 'CPPDEFINES': ['USING_V8_SHARED']
203 }, 203 },
204 'prof:on': {
205 'LINKFLAGS': ['/MAP']
206 },
204 'mode:release': { 207 'mode:release': {
205 'CCFLAGS': ['/Ox', '/MT', '/GF'], 208 'CCFLAGS': ['/Ox', '/MT', '/GF'],
206 'LINKFLAGS': ['/OPT:REF', '/OPT:ICF'] 209 'LINKFLAGS': ['/OPT:REF', '/OPT:ICF']
207 }, 210 },
208 'mode:debug': { 211 'mode:debug': {
209 'CCFLAGS': ['/Od', '/MTd'], 212 'CCFLAGS': ['/Od', '/MTd'],
210 'LINKFLAGS': ['/DEBUG'] 213 'LINKFLAGS': ['/DEBUG']
211 } 214 }
212 } 215 }
213 } 216 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 'arch': { 276 'arch': {
274 'values':['arm', 'ia32'], 277 'values':['arm', 'ia32'],
275 'default': ARCH_GUESS, 278 'default': ARCH_GUESS,
276 'help': 'the architecture to build for' 279 'help': 'the architecture to build for'
277 }, 280 },
278 'snapshot': { 281 'snapshot': {
279 'values': ['on', 'off'], 282 'values': ['on', 'off'],
280 'default': 'off', 283 'default': 'off',
281 'help': 'build using snapshots for faster start-up' 284 'help': 'build using snapshots for faster start-up'
282 }, 285 },
286 'prof': {
287 'values': ['on', 'off'],
288 'default': 'off',
289 'help': 'enable profiling of build target'
290 },
283 'library': { 291 'library': {
284 'values': ['static', 'shared'], 292 'values': ['static', 'shared'],
285 'default': 'static', 293 'default': 'static',
286 'help': 'the type of library to produce' 294 'help': 'the type of library to produce'
287 }, 295 },
288 'wordsize': { 296 'wordsize': {
289 'values': ['64', '32'], 297 'values': ['64', '32'],
290 'default': WORDSIZE_GUESS, 298 'default': WORDSIZE_GUESS,
291 'help': 'the word size' 299 'help': 'the word size'
292 }, 300 },
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 Abort("Illegal value for option %s '%s'." % (option, s)) 338 Abort("Illegal value for option %s '%s'." % (option, s))
331 return False 339 return False
332 return True 340 return True
333 341
334 342
335 def VerifyOptions(env): 343 def VerifyOptions(env):
336 if not IsLegal(env, 'mode', ['debug', 'release']): 344 if not IsLegal(env, 'mode', ['debug', 'release']):
337 return False 345 return False
338 if not IsLegal(env, 'sample', ["shell", "process"]): 346 if not IsLegal(env, 'sample', ["shell", "process"]):
339 return False 347 return False
348 if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on' :
349 Abort("Profiling on windows only supported for static library.")
340 for (name, option) in SIMPLE_OPTIONS.iteritems(): 350 for (name, option) in SIMPLE_OPTIONS.iteritems():
341 if (not option.get('default')) and (name not in ARGUMENTS): 351 if (not option.get('default')) and (name not in ARGUMENTS):
342 message = ("A value for option %s must be specified (%s)." % 352 message = ("A value for option %s must be specified (%s)." %
343 (name, ", ".join(option['values']))) 353 (name, ", ".join(option['values'])))
344 Abort(message) 354 Abort(message)
345 if not env[name] in option['values']: 355 if not env[name] in option['values']:
346 message = ("Unknown %s value '%s'. Possible values are (%s)." % 356 message = ("Unknown %s value '%s'. Possible values are (%s)." %
347 (name, env[name], ", ".join(option['values']))) 357 (name, env[name], ", ".join(option['values'])))
348 Abort(message) 358 Abort(message)
349 359
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 # version of scons. Also, there's a bug in some revisions that 542 # version of scons. Also, there's a bug in some revisions that
533 # doesn't allow this flag to be set, so we swallow any exceptions. 543 # doesn't allow this flag to be set, so we swallow any exceptions.
534 # Lovely. 544 # Lovely.
535 try: 545 try:
536 SetOption('warn', 'no-deprecated') 546 SetOption('warn', 'no-deprecated')
537 except: 547 except:
538 pass 548 pass
539 549
540 550
541 Build() 551 Build()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698