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

Side by Side Diff: build/SConscript.main

Issue 13039: Fixes and enhancements... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years 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 | « base/base_unittests.scons ('k') | build/debug.scons » ('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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 import shutil 6 import shutil
7 import sys 7 import sys
8 8
9 9
10 p = ARGUMENTS.get('PROGRESS') 10 p = ARGUMENTS.get('PROGRESS')
11 if p == 'spinner': 11 if p == 'spinner':
12 Progress(['/\r', '|\r', '\\\r', '-\r'], interval=5, file=open('con', 'w')) 12 Progress(['/\r', '|\r', '\\\r', '-\r'], interval=5, file=open('con', 'w'))
13 elif p == 'name': 13 elif p == 'name':
14 Progress('$TARGET\r', overwrite=True, file=open('con', 'w')) 14 Progress('$TARGET\r', overwrite=True, file=open('con', 'w'))
15 15
16 16
17 default_warnings = ['no-missing-sconscript', 'no-no-parallel-support'] 17 default_warnings = ['no-missing-sconscript', 'no-no-parallel-support']
18 default_warnings = ['no-no-parallel-support'] 18 default_warnings = ['no-no-parallel-support']
19 SetOption('warn', default_warnings + GetOption('warn')) 19 SetOption('warn', default_warnings + GetOption('warn'))
20 20
21 21
22 chrome_build_type = ARGUMENTS.get('CHROME_BUILD_TYPE') 22 # Variables for controlling the build.
23 if chrome_build_type is None: 23 #
24 chrome_build_type = os.environ.get('CHROME_BUILD_TYPE', ''), 24 # The following variables can be set either on the command line
25 25 # or in the external environment when executing SCons, with the
26 chromium_build = ARGUMENTS.get('CHROMIUM_BUILD') 26 # command line overriding any environment setting.
27 if chromium_build is None: 27 #
28 chromium_build = os.environ.get('CHROMIUM_BUILD', ''), 28 # CHROME_BUILD_TYPE
29 # When set, applies settings from the file
30 # build\internal\release_impl${CHROME_BUILD_TYPE}.scons
31 # to be applied to the construction environment.
32 #
33 # CHROMIUM_BUILD
34 # When set, applies settings from the file
35 # build\internal\chromium_build${CHROMIUM_BUILD}.scons
36 # to be applied to the construction environment.
37 #
38 # INCREMENTAL
39 # Controls whether or not libraries and executable programs are
40 # linked incrementally. When set to any True value (1, T, y, True),
41 # uses the /INCREMENTAL flag to the Microsoft linker. An
42 # explicit False value (0, f, N, false) uses the /INCREMENTAL:NO.
43 # When not set, the default is to link debug (developer) builds
44 # incrementally, but release builds use full links.
45 #
46 clvars = Variables('scons.opts', ARGUMENTS)
47 clvars.AddVariables(
48 ('CHROME_BUILD_TYPE', '', os.environ.get('CHROME_BUILD_TYPE', '')),
49 ('CHROMIUM_BUILD', '', os.environ.get('CHROMIUM_BUILD', '')),
50 BoolVariable('INCREMENTAL', '', os.environ.get('INCREMENTAL')),
51 )
29 52
30 53
31 root_env = Environment( 54 root_env = Environment(
32 tools = ['component_setup', 55 tools = ['component_setup',
33 'chromium_builders', 56 'chromium_builders',
34 'chromium_load_component'], 57 'chromium_load_component'],
58 variables = clvars,
35 59
36 # Requested list of system (shared) libraries, from the comma separated 60 # Requested list of system (shared) libraries, from the comma separated
37 # SYSTEM_LIBS command-line argument 61 # SYSTEM_LIBS command-line argument
38 req_system_libs = [], 62 req_system_libs = [],
39 # All supported system libraries, for the help message 63 # All supported system libraries, for the help message
40 all_system_libs = [], 64 all_system_libs = [],
41 65
42 CHROME_BUILD_TYPE = chrome_build_type,
43 CHROMIUM_BUILD = chromium_build,
44
45 CHROME_SRC_DIR = '$MAIN_DIR/..', 66 CHROME_SRC_DIR = '$MAIN_DIR/..',
46 DESTINATION_ROOT = '$MAIN_DIR/Hammer', 67 DESTINATION_ROOT = '$MAIN_DIR/Hammer',
47 68
48 # Where ComponentTestProgram() will build test executables. 69 # Where ComponentTestProgram() will build test executables.
49 TESTS_DIR = '$DESTINATION_ROOT', 70 TESTS_DIR = '$DESTINATION_ROOT',
50 71
51 # Where ComponentProgram() will build program executables. 72 # Where ComponentProgram() will build program executables.
52 STAGING_DIR = '$DESTINATION_ROOT', 73 STAGING_DIR = '$DESTINATION_ROOT',
53 74
54 # Where ComponentLibrary() will build libraries. 75 # Where ComponentLibrary() will build libraries.
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 # *_OPTIMIZED constructionv variables that add magic values to 228 # *_OPTIMIZED constructionv variables that add magic values to
208 # CCFLAGS. We override the normal variables (CPPDEFINES, CCFLAGS, 229 # CCFLAGS. We override the normal variables (CPPDEFINES, CCFLAGS,
209 # LINKFLAGS, ARFLAGS) below, but get rid of the special Hammer ones 230 # LINKFLAGS, ARFLAGS) below, but get rid of the special Hammer ones
210 # here, until Hammer can be made a little nicer about htis. 231 # here, until Hammer can be made a little nicer about htis.
211 232
212 del windows_env['CCFLAGS_DEBUG'] 233 del windows_env['CCFLAGS_DEBUG']
213 del windows_env['LINKFLAGS_DEBUG'] 234 del windows_env['LINKFLAGS_DEBUG']
214 del windows_env['CCFLAGS_OPTIMIZED'] 235 del windows_env['CCFLAGS_OPTIMIZED']
215 236
216 windows_env['PDB'] = '${TARGET.base}.pdb' 237 windows_env['PDB'] = '${TARGET.base}.pdb'
238 windows_env['MSVC_BATCH'] = True
217 239
218 # TODO(bradnelson): this should not need to be gated on host platform. 240 # TODO(bradnelson): this should not need to be gated on host platform.
219 if root_env['PLATFORM'] in ['win32', 'cygwin']: 241 if root_env['PLATFORM'] in ['win32', 'cygwin']:
220 msvs_env = Environment(tools=['msvc', 'mslink', 'msvs'])['ENV'] 242 msvs_env = Environment(tools=['msvc', 'mslink', 'msvs'])['ENV']
221 msvs_drive = msvs_env['PATH'][0] 243 msvs_drive = msvs_env['PATH'][0]
222 else: 244 else:
223 msvs_env = {'PATH': '', 'INCLUDE': '', 'LIB': ''} 245 msvs_env = {'PATH': '', 'INCLUDE': '', 'LIB': ''}
224 msvs_drive = 'C' 246 msvs_drive = 'C'
225 247
226 # Use the absolute path for MSVC because it might not be on the same drive 248 # Use the absolute path for MSVC because it might not be on the same drive
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 mac_env.Replace( 519 mac_env.Replace(
498 # Reproduce XCode's behavior of using gcc even to link C++, 520 # Reproduce XCode's behavior of using gcc even to link C++,
499 # and distinguishing it the -x c++ option. 521 # and distinguishing it the -x c++ option.
500 CC = 'gcc-4.2', 522 CC = 'gcc-4.2',
501 CXX = 'g++-4.2', 523 CXX = 'g++-4.2',
502 LINK = '$CXX', 524 LINK = '$CXX',
503 ) 525 )
504 526
505 mac_env.FilterOut( 527 mac_env.FilterOut(
506 BUILD_SCONSCRIPTS = [ 528 BUILD_SCONSCRIPTS = [
529 '$BREAKPAD_DIR/SConscript',
530 '$BSDIFF_DIR/bsdiff.scons',
507 '$BSPATCH_DIR/bspatch.scons', 531 '$BSPATCH_DIR/bspatch.scons',
508 '$BSDIFF_DIR/bsdiff.scons', 532 '$CHROME_DIR/chrome.scons',
509 '$LIBJPEG_DIR/SConscript',
510 '$LIBXML_DIR/SConscript',
511 '$LIBXSLT_DIR/SConscript',
512 '$BREAKPAD_DIR/SConscript',
513 '$CHROME_DIR/SConscript',
514 '$GEARS_DIR/SConscript', 533 '$GEARS_DIR/SConscript',
515 '$GOOGLE_UPDATE_DIR/SConscript', 534 '$GOOGLE_UPDATE_DIR/SConscript',
535 '$LIBJPEG_DIR/libjpeg.scons',
536 '$LIBXML_DIR/libxml.scons',
537 '$LIBXSLT_DIR/libxslt.scons',
516 '$RLZ_DIR/SConscript', 538 '$RLZ_DIR/SConscript',
517 '$SANDBOX_DIR/sandbox.scons', 539 '$SANDBOX_DIR/sandbox.scons',
540 '$WEBKIT_DIR/SConscript',
518 'build/SConscript.v8', 541 'build/SConscript.v8',
519 '$WEBKIT_DIR/SConscript',
520 ], 542 ],
521 ) 543 )
522 544
523 if not root_env.WantSystemLib('libevent'): 545 if not root_env.WantSystemLib('libevent'):
524 mac_env.Append( 546 mac_env.Append(
525 BUILD_SCONSCRIPTS = [ 547 BUILD_SCONSCRIPTS = [
526 '$LIBEVENT_DIR/libevent.scons', 548 '$LIBEVENT_DIR/libevent.scons',
527 ], 549 ],
528 ) 550 )
529 mac_env.Append( 551 mac_env.Append(
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 'all_libraries', 712 'all_libraries',
691 'all_languages', 713 'all_languages',
692 'all_programs', 714 'all_programs',
693 'all_test_programs', 715 'all_test_programs',
694 ], projects = [p], 716 ], projects = [p],
695 COMPONENT_VS_PROJECT_SCRIPT_PATH=( 717 COMPONENT_VS_PROJECT_SCRIPT_PATH=(
696 'cd $$(ProjectDir)/$VS_PROJECT_TO_MAIN_DIR && hammer.bat'), 718 'cd $$(ProjectDir)/$VS_PROJECT_TO_MAIN_DIR && hammer.bat'),
697 ) 719 )
698 720
699 # ------------------------------------------------------------------------- 721 # -------------------------------------------------------------------------
OLDNEW
« no previous file with comments | « base/base_unittests.scons ('k') | build/debug.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698