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: http://src.chromium.org/svn/trunk/src/build@10759 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
sgk@google.com 2009-03-03 00:35:36 +00:00
Родитель 68297f8d17
Коммит 77a0e1d007
1 изменённых файлов: 25 добавлений и 11 удалений

Просмотреть файл

@ -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'):