diff options
-rw-r--r-- | DEPS | 2 | ||||
-rw-r--r-- | build/SConscript.main | 32 | ||||
-rw-r--r-- | build/SConscript.v8 | 17 | ||||
-rw-r--r-- | build/using_v8.scons | 20 | ||||
-rw-r--r-- | chrome/test/unit/unit_tests.scons | 2 | ||||
-rw-r--r-- | net/base/host_resolver_unittest.cc | 4 | ||||
-rw-r--r-- | net/net_perftests.scons | 5 | ||||
-rw-r--r-- | third_party/dmg_fp/dmg_fp.scons | 1 | ||||
-rw-r--r-- | webkit/tools/test_shell/SConscript | 5 |
9 files changed, 69 insertions, 19 deletions
@@ -15,7 +15,7 @@ deps = { "/trunk/deps/third_party/WebKit@5398", "src/third_party/icu38": - "/trunk/deps/third_party/icu38@5179", + "/trunk/deps/third_party/icu38@5385", "src/v8": "http://v8.googlecode.com/svn/trunk@696", diff --git a/build/SConscript.main b/build/SConscript.main index cccbd6a..cf59228 100644 --- a/build/SConscript.main +++ b/build/SConscript.main @@ -37,13 +37,12 @@ root_env = Environment( CHROME_SRC_DIR = '$MAIN_DIR/..', DESTINATION_ROOT = '$MAIN_DIR/Hammer', - TARGET_ROOT = '$DESTINATION_ROOT', # Where ComponentTestProgram() will build test executables. - TESTS_DIR = '$TARGET_ROOT', + TESTS_DIR = '$DESTINATION_ROOT', # Where ComponentProgram() will build program executables. - STAGING_DIR = '$TARGET_ROOT', + STAGING_DIR = '$DESTINATION_ROOT', # Where ComponentLibrary() will build libraries. LIBS_DIR = '$COMPONENT_LIBRARY_DIR', @@ -441,16 +440,8 @@ windows_env.AppendENVPath('PATH', ';C:\\WINDOWS\\system32') # Linux specific linux_env = root_env.Clone() -environment_list.append(linux_env) linux_env.Tool('target_platform_linux') -linux_env.Tool('target_debug') linux_env.Tool('yacc') -linux_env.Replace( - BUILD_TYPE = 'debug-linux', - BUILD_TYPE_DESCRIPTION = 'Linux debug build', -) -linux_env.Append(BUILD_GROUPS = ['default']) - # TODO(bradnelson): this is needed for now because target_platform_linux has # OS_LINUX defined in a weird way. @@ -568,6 +559,25 @@ if root_env['PLATFORM'] in ['linux', 'linux2', 'posix']: 'libxslt requested in SYSTEM_LIBS but not found\n') sys.exit(1) +linux_dbg = linux_env.Clone() +environment_list.append(linux_dbg) +linux_dbg.Replace( + BUILD_TYPE = 'dbg', + BUILD_TYPE_DESCRIPTION = 'Linux debug build', +) +linux_dbg.Tool('target_debug') +linux_dbg.Append(BUILD_GROUPS = ['default']) + +linux_opt = linux_env.Clone() +environment_list.append(linux_opt) +# Disable rpath for faster startup. +linux_opt.Append(RPATH = []) +linux_opt.Replace( + BUILD_TYPE = 'opt', + BUILD_TYPE_DESCRIPTION = 'Linux optimized build', +) +linux_opt.Tool('target_optimized') + # -------------------------------------------------------------------------- # Mac specific diff --git a/build/SConscript.v8 b/build/SConscript.v8 index 1e7cfb0..22717b8 100644 --- a/build/SConscript.v8 +++ b/build/SConscript.v8 @@ -13,8 +13,14 @@ try: except AttributeError: cpu_flag = '' +# The v8 build script wants a 'debug'/'release' string to tell it whether +# to build optimized. Convert our build flags into that form. +mode = 'release' +if env['TARGET_DEBUG']: + mode = 'debug' + env = env.Clone( - V8_MODE = 'debug', + V8_MODE = mode, V8_MODE_DIR = '$V8_DIR/obj/$V8_MODE', V8_SCONS_COM = '$PYTHON $SCONS $SCONSFLAGS mode=$V8_MODE', SCONS='$CHROME_SRC_DIR/third_party/scons/scons.py', @@ -36,9 +42,14 @@ if not os.path.exists(env.Dir('$OBJ_ROOT/v8').abspath): Mkdir(env.Dir('$OBJ_ROOT/v8').abspath) +# v8 builds all outputs "foo" instead as "foo_g" in debug mode. +binsuffix = '' +if env['TARGET_DEBUG']: + binsuffix = '_g' + v8_scons_targets_off = [ - '$V8_DIR/shell_g${PROGSUFFIX}', - '$V8_DIR/${LIBPREFIX}v8_g${LIBSUFFIX}', + '$V8_DIR/shell%s${PROGSUFFIX}' % binsuffix, + '$V8_DIR/${LIBPREFIX}v8%s${LIBSUFFIX}' % binsuffix, '$V8_MODE_DIR/mksnapshot${PROGSUFFIX}', '$V8_MODE_DIR/libraries${OBJSUFFIX}', '$V8_MODE_DIR/snapshot-empty${OBJSUFFIX}', diff --git a/build/using_v8.scons b/build/using_v8.scons new file mode 100644 index 0000000..889bce1 --- /dev/null +++ b/build/using_v8.scons @@ -0,0 +1,20 @@ +# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +__doc__ = """ +Settings for other components using the v8 library. +""" + +Import("env") + +# v8 builds the lib as v8_g in debug mode. +v8_lib = 'v8' +if env['TARGET_DEBUG']: + v8_lib = 'v8_g' + +env.Append( + LIBS = [ + v8_lib, + ], +) diff --git a/chrome/test/unit/unit_tests.scons b/chrome/test/unit/unit_tests.scons index 1cac8f3..b2011a0 100644 --- a/chrome/test/unit/unit_tests.scons +++ b/chrome/test/unit/unit_tests.scons @@ -13,6 +13,7 @@ env.SConscript([ '$CHROME_DIR/third_party/hunspell/using_hunspell.scons', '$CHROME_DIR/third_party/wtl/using_wtl.scons', '$CHROME_SRC_DIR/build/using_googleurl.scons', + '$CHROME_SRC_DIR/build/using_v8.scons', '$DMG_FP_DIR/using_dmg_fp.scons', '$GTEST_DIR/../using_gtest.scons', '$ICU38_DIR/using_icu38.scons', @@ -48,7 +49,6 @@ env.Prepend( 'renderer', 'sqlite', 'util', - 'v8_g', 'v8_snapshot', 'WTF', diff --git a/net/base/host_resolver_unittest.cc b/net/base/host_resolver_unittest.cc index fde5a1a..018246d 100644 --- a/net/base/host_resolver_unittest.cc +++ b/net/base/host_resolver_unittest.cc @@ -31,8 +31,8 @@ TEST(HostResolverTest, NumericAddresses) { const struct sockaddr* sa = ainfo->ai_addr; const struct sockaddr_in* sa_in = (const struct sockaddr_in*) sa; - EXPECT_EQ(htons(kPortnum), sa_in->sin_port); - EXPECT_EQ(htonl(0x7f000001), sa_in->sin_addr.s_addr); + EXPECT_TRUE(htons(kPortnum) == sa_in->sin_port); + EXPECT_TRUE(htonl(0x7f000001) == sa_in->sin_addr.s_addr); } } // namespace diff --git a/net/net_perftests.scons b/net/net_perftests.scons index 773fb58..0c276ac 100644 --- a/net/net_perftests.scons +++ b/net/net_perftests.scons @@ -57,6 +57,11 @@ if env['PLATFORM'] == 'win32': '/nxcompat', ], ) +elif env['PLATFORM'] == 'posix': + env.Append( + # TODO(port): disk_cache_perftest breaks strict aliasing rules. + CCFLAGS = ['-fno-strict-aliasing'], + ) input_files = [ 'base/cookie_monster_perftest.cc', diff --git a/third_party/dmg_fp/dmg_fp.scons b/third_party/dmg_fp/dmg_fp.scons index 38bfe96..8ac9cba 100644 --- a/third_party/dmg_fp/dmg_fp.scons +++ b/third_party/dmg_fp/dmg_fp.scons @@ -35,6 +35,7 @@ if env['PLATFORM'] in ('darwin', 'posix'): # Disable only what's necessary. env.Append( CCFLAGS = [ + '-Wno-uninitialized', '-Wno-parentheses', '-Wno-sign-compare', '-Wno-unused-label', diff --git a/webkit/tools/test_shell/SConscript b/webkit/tools/test_shell/SConscript index 640e5b2..fffe1ae 100644 --- a/webkit/tools/test_shell/SConscript +++ b/webkit/tools/test_shell/SConscript @@ -7,6 +7,10 @@ Import('env', 'env_res') env = env.Clone() env_res = env_res.Clone() +env.SConscript([ + '$CHROME_SRC_DIR/build/using_v8.scons', +], {'env':env}) + if env['PLATFORM'] == 'win32': env_res.Append( CPPPATH = [ @@ -50,7 +54,6 @@ env.Append( 'modp_b64', 'zlib', 'sqlite', - 'v8_g', 'JavaScriptCore_pcre', 'default_plugin', ], |