diff options
author | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-03 00:35:36 +0000 |
---|---|---|
committer | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-03 00:35:36 +0000 |
commit | 2fd6c6d0ffca6993559b5aac0b3dde8a75c3d338 (patch) | |
tree | 8a342eb6791af7f9b12bdc784d87d8380d985869 /build | |
parent | 32670b07a6c42634f446e3d471f42a9fb40090f2 (diff) | |
download | chromium_src-2fd6c6d0ffca6993559b5aac0b3dde8a75c3d338.zip chromium_src-2fd6c6d0ffca6993559b5aac0b3dde8a75c3d338.tar.gz chromium_src-2fd6c6d0ffca6993559b5aac0b3dde8a75c3d338.tar.bz2 |
Start stitching GYP-generated files into the Linux build:
* Add a GYP=1 command-line variable to use the gyp-generated files
(which are generated side-by-side until everything's okay enough
to cut over for real).
* Rearrange existing *.scons files to match the layout of the
gyp-generated ones, so the transition will be easier:
* base.scons (the wrapping logic that calls the other *.scons files)
=> base_sln.scons
* base_lib.scons (the library itself)
=> base.scons (matching the gyp target generation)
* gfx/base_gfx.scons
=> base_gfx.scons (with necessary prepending of "gfx/" to path names)
build/SConscript.main fixes:
* Use an internal ${_GYP} infix variable to select the right flavor
of *.scons file (multiple places)
* When building with GYP=1, only load the one component *_sln_gyp.scons
file, because gyp has already created it with knowledge of all the
right dependent *_gyp.scons files to load.
Linux gyp build fixes:
* Add -32 to $ASFLAGS for generating a 32-bit libicudata.a from the
now-checked in .s.
* Add -Wno-unused and -Wno-unused-function to skia.
Review URL: http://codereview.chromium.org/28207
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10759 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r-- | build/SConscript.main | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/build/SConscript.main b/build/SConscript.main index 6558762..60c4df0 100644 --- a/build/SConscript.main +++ b/build/SConscript.main @@ -149,6 +149,7 @@ root_env = Environment( ) root_env['req_system_libs'] = ARGUMENTS.get('SYSTEM_LIBS', '').split(',') +root_env['_GYP'] = ARGUMENTS.get('GYP') and '_gyp' or '' def WantSystemLib(env, lib): """ @@ -188,8 +189,8 @@ components = [] # Default is to load all SConscript files for a full-tree build. # The keyword arguments in the call below (base, breakpad, etc.) can be # specified in the LOAD= argument to cut down on the build. -sconscripts = root_env.ChromiumLoadComponentSConscripts( - base = '$BASE_DIR/base.scons', +sconscript_map = dict( + base = '$BASE_DIR/base_main${_GYP}.scons', breakpad = '$BREAKPAD_DIR/SConscript', chrome = '$CHROME_DIR/chrome.scons', gears = '$GEARS_DIR/SConscript', @@ -207,24 +208,31 @@ sconscripts = root_env.ChromiumLoadComponentSConscripts( '$BSDIFF_DIR/bsdiff.scons', '$BSPATCH_DIR/bspatch.scons', '$BZIP2_DIR/bzip2.scons', - '$ICU38_DIR/icu38.scons', - '$LIBJPEG_DIR/libjpeg.scons', - '$LIBPNG_DIR/libpng.scons', + '$ICU38_DIR/icu38_main${_GYP}.scons', + '$LIBJPEG_DIR/libjpeg${_GYP}.scons', + '$LIBPNG_DIR/libpng${_GYP}.scons', '$LIBXML_DIR/libxml.scons', '$LIBXSLT_DIR/libxslt.scons', '$LZMA_SDK_DIR/lzma_sdk.scons', '$MODP_B64_DIR/modp_b64.scons', - '$ZLIB_DIR/zlib.scons', + '$ZLIB_DIR/zlib${_GYP}.scons', ], tools = '$GTK_CLIP_DUMP_DIR/gcd.scons', v8 = '$OBJ_ROOT/build/SConscript.v8', webkit = '$WEBKIT_DIR/webkit.scons', ) +if root_env.get('_GYP'): + Import('build_component') + sconscripts = [sconscript_map[build_component]] + components = [build_component] +else: + sconscripts = root_env.ChromiumLoadComponentSConscripts(**sconscript_map) + # Add the final list into the root environment to be build in BuildComponents. root_env.Append(BUILD_SCONSCRIPTS = sconscripts) -if not root_env.WantSystemLib('sqlite'): +if not root_env.WantSystemLib('sqlite') and not root_env.get('_GYP'): root_env.Append(BUILD_SCONSCRIPTS = ['$SQLITE_DIR/SConscript']) @@ -453,10 +461,14 @@ excluded_warnings = [ # (see unordered_map and base/hash_tables.h) '-Wno-deprecated', # Needed for using ext/hash_map on GCC 4.3 ] -linux_env.Append( +if not root_env.get('_GYP'): + linux_env.Append( BUILD_SCONSCRIPTS = [ - '$LIBEVENT_DIR/libevent.scons', + '$LIBEVENT_DIR/libevent${_GYP}.scons', ], + ) +linux_env.Append( + ASFLAGS = ['-32'], CCFLAGS = ['-m32', '-pthread', '-march=i686', '-fno-exceptions'], # GCC will generate ident directives with the GCC version. Accumulate # these all up and you end up with ~80K repeated in a .comment section. @@ -644,10 +656,10 @@ mac_env.FilterOut( # OS_MACOSX defined in a weird way. mac_env.FilterOut(CPPDEFINES = ['OS_MACOSX=OS_MACOSX']) -if not root_env.WantSystemLib('libevent'): +if not root_env.WantSystemLib('libevent') and not root_env.get('_GYP'): mac_env.Append( BUILD_SCONSCRIPTS = [ - '$LIBEVENT_DIR/libevent.scons', + '$LIBEVENT_DIR/libevent${_GYP}.scons', ], ) mac_env.Append( @@ -747,6 +759,8 @@ Supported build variables: PROGRESS=type Display a progress indicator: name: print each evaluated target name spinner: print a spinner every 5 targets + GYP=1 Any non-null value uses GYP-generated files + (*_gyp.scons). """ if GetOption('help'): |