diff options
author | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-20 23:13:26 +0000 |
---|---|---|
committer | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-20 23:13:26 +0000 |
commit | 9d384037786ac2912d2ffc82cd1718d8383d8d9f (patch) | |
tree | fc85e1d240d0b31c1dd488fcb1723133290d8291 /build/common.gypi | |
parent | e66eaf0cc9fe5c6c17ffee01fc2d370270b9e07f (diff) | |
download | chromium_src-9d384037786ac2912d2ffc82cd1718d8383d8d9f.zip chromium_src-9d384037786ac2912d2ffc82cd1718d8383d8d9f.tar.gz chromium_src-9d384037786ac2912d2ffc82cd1718d8383d8d9f.tar.bz2 |
Update the gyp Linux build:
* Add Linux settings to target_defaults in common.gypi so
gyp-generated SConscript files no longer depend on
build/SConscript.main or the Hammer infrastructure.
* Copy the FilterOut() function from Hammer to the chromium_builders.py
Tool module.
* Add a ChromiumLoadableModule() builder to chromium_builders.py.
* Add dependencies on the 'views' library to the chrome link (target 'app').
* Add missing views/*/*_unittest.cc modules to the 'unit_tests' target.
Exclude all but the one that builds on Linux from the non-Windows builds.
* Crib a list of chrome/views files to exclude from the Linux build
from the old SCons configuration.
* Add a new build/linux/system.gyp file with new 'settings' targets
to encapsulate the pkg-config checks for gtk+-2.0, nss and pangoft2.
* Add depenedencies in the other targets on the new gtk, nss and
pangoft2 'settings' targets from build/linux/system.gyp.
* Add a pkg_config_wrapper.py script that keeps gyp happy by
simply exiting 0 if the package isn't found.
* DEPS roll for latest gyp changes to support the above.
Review URL: http://codereview.chromium.org/42340
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12228 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/common.gypi')
-rw-r--r-- | build/common.gypi | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/build/common.gypi b/build/common.gypi index f476546..2ce3140 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -87,6 +87,76 @@ }, }, 'conditions': [ + [ 'OS=="linux"', { + 'target_defaults': { + 'asflags': [ + # Needed so that libs with .s files (e.g. libicudata.a) + # are compatible with the general 32-bit-ness. + '-32', + ], + # All floating-point computations on x87 happens in 80-bit + # precision. Because the C and C++ language standards allow + # the compiler to keep the floating-point values in higher + # precision than what's specified in the source and doing so + # is more efficient than constantly rounding up to 64-bit or + # 32-bit precision as specified in the source, the compiler, + # especially in the optimized mode, tries very hard to keep + # values in x87 floating-point stack (in 80-bit precision) + # as long as possible. This has important side effects, that + # the real value used in computation may change depending on + # how the compiler did the optimization - that is, the value + # kept in 80-bit is different than the value rounded down to + # 64-bit or 32-bit. There are possible compiler options to make + # this behavior consistent (e.g. -ffloat-store would keep all + # floating-values in the memory, thus force them to be rounded + # to its original precision) but they have significant runtime + # performance penalty. + # + # -mfpmath=sse -msse2 makes the compiler use SSE instructions + # which keep floating-point values in SSE registers in its + # native precision (32-bit for single precision, and 64-bit for + # double precision values). This means the floating-point value + # used during computation does not change depending on how the + # compiler optimized the code, since the value is always kept + # in its specified precision. + 'cflags': [ + '-m32', + '-pthread', + '-march=pentium4', + '-fno-exceptions', + '-msse2', + '-mfpmath=sse', + ], + 'linkflags': [ + '-m32', + '-pthread', + ], + 'scons_settings': { + 'LIBPATH': ['$DESTINATION_ROOT/lib'], + # Linking of large files uses lots of RAM, so serialize links + # using the handy flock command from util-linux. + 'FLOCK_LINK': ['flock', '$DESTINATION_ROOT/linker.lock', '$LINK'], + + # We have several cases where archives depend on each other in + # a cyclic fashion. Since the GNU linker does only a single + # pass over the archives we surround the libraries with + # --start-group and --end-group (aka -( and -) ). That causes + # ld to loop over the group until no more undefined symbols + # are found. In an ideal world we would only make groups from + # those libraries which we knew to be in cycles. However, + # that's tough with SCons, so we bodge it by making all the + # archives a group by redefining the linking command here. + # + # TODO: investigate whether we still have cycles that + # require --{start,end}-group. There has been a lot of + # refactoring since this was first coded, which might have + # eliminated the circular dependencies. + 'LINKCOM': [['$FLOCK_LINK', '-o', '$TARGET', '$LINKFLAGS', '$SOURCES', '$_LIBDIRFLAGS', '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']], + 'SHLINKCOM': [['$FLOCK_LINK', '-o', '$TARGET $SHLIN', 'FLAGS', '$SOURCES', '$_LIBDIRFLAGS', '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']], + 'IMPLICIT_COMMAND_DEPENDENCIES': 0, + }, + }, + }], ['OS=="mac"', { 'target_defaults': { 'mac_bundle': 0, |