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

Side by Side Diff: SConstruct

Issue 2422: Apply the flags to the SCons environment used to link the library to have the... (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 27 matching lines...) Expand all
38 38
39 LIBRARY_FLAGS = { 39 LIBRARY_FLAGS = {
40 'all': { 40 'all': {
41 'CPPDEFINES': ['ENABLE_LOGGING_AND_PROFILING'] 41 'CPPDEFINES': ['ENABLE_LOGGING_AND_PROFILING']
42 }, 42 },
43 'gcc': { 43 'gcc': {
44 'all': { 44 'all': {
45 'DIALECTFLAGS': ['-ansi'], 45 'DIALECTFLAGS': ['-ansi'],
46 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS', 46 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS',
47 '-fno-strict-aliasing'], 47 '-fno-strict-aliasing'],
48 'CXXFLAGS': ['$CCFLAGS', '-fno-rtti', '-fno-exceptions'], 48 'CXXFLAGS': ['-fno-rtti', '-fno-exceptions'],
49 'LIBS': ['pthread'] 49 'LIBS': ['pthread']
50 }, 50 },
51 'mode:debug': { 51 'mode:debug': {
52 'CCFLAGS': ['-g', '-O0'], 52 'CCFLAGS': ['-g', '-O0'],
53 'CPPDEFINES': ['ENABLE_DISASSEMBLER', 'DEBUG'] 53 'CPPDEFINES': ['ENABLE_DISASSEMBLER', 'DEBUG']
54 }, 54 },
55 'mode:release': { 55 'mode:release': {
56 'CCFLAGS': ['-O2'] 56 'CCFLAGS': ['-O2']
57 }, 57 },
58 'wordsize:64': { 58 'wordsize:64': {
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 449
450 # Build the object files by invoking SCons recursively. 450 # Build the object files by invoking SCons recursively.
451 object_files = env.SConscript( 451 object_files = env.SConscript(
452 join('src', 'SConscript'), 452 join('src', 'SConscript'),
453 build_dir=join('obj', target_id), 453 build_dir=join('obj', target_id),
454 exports='context', 454 exports='context',
455 duplicate=False 455 duplicate=False
456 ) 456 )
457 457
458 # Link the object files into a library. 458 # Link the object files into a library.
459 env.Replace(**context.flags['v8'])
459 context.ApplyEnvOverrides(env) 460 context.ApplyEnvOverrides(env)
460 if context.options['library'] == 'static': 461 if context.options['library'] == 'static':
461 library = env.StaticLibrary(library_name, object_files) 462 library = env.StaticLibrary(library_name, object_files)
462 else: 463 else:
463 # There seems to be a glitch in the way scons decides where to put 464 # There seems to be a glitch in the way scons decides where to put
464 # PDB files when compiling using MSVC so we specify it manually. 465 # PDB files when compiling using MSVC so we specify it manually.
465 # This should not affect any other platforms. 466 # This should not affect any other platforms.
466 pdb_name = library_name + '.dll.pdb' 467 pdb_name = library_name + '.dll.pdb'
467 library = env.SharedLibrary(library_name, object_files, PDB=pdb_name) 468 library = env.SharedLibrary(library_name, object_files, PDB=pdb_name)
468 context.library_targets.append(library) 469 context.library_targets.append(library)
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 # version of scons. Also, there's a bug in some revisions that 528 # version of scons. Also, there's a bug in some revisions that
528 # doesn't allow this flag to be set, so we swallow any exceptions. 529 # doesn't allow this flag to be set, so we swallow any exceptions.
529 # Lovely. 530 # Lovely.
530 try: 531 try:
531 SetOption('warn', 'no-deprecated') 532 SetOption('warn', 'no-deprecated')
532 except: 533 except:
533 pass 534 pass
534 535
535 536
536 Build() 537 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