diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-03 22:44:59 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-03 22:44:59 +0000 |
commit | b07806c1b94cf62c743d90a5d96ad7f650193f0b (patch) | |
tree | 15edeae6658730d208bcdbc1ae5694138ed5e397 | |
parent | 6ac1b4026d326a4316b192dfbc643b58981284ba (diff) | |
download | chromium_src-b07806c1b94cf62c743d90a5d96ad7f650193f0b.zip chromium_src-b07806c1b94cf62c743d90a5d96ad7f650193f0b.tar.gz chromium_src-b07806c1b94cf62c743d90a5d96ad7f650193f0b.tar.bz2 |
linux: use an in-tree copy of gold by default
(Reland of r120385 with newer third_party/gold.)
Rather than forcing everyone to configure their search paths etc.
we should just make this work by default. You can set
the gyp variable linux_use_gold_binary=0 to turn it off.
Review URL: https://chromiumcodereview.appspot.com/9316002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120424 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | DEPS | 3 | ||||
-rw-r--r-- | build/common.gypi | 23 | ||||
-rwxr-xr-x | tools/checkperms/checkperms.py | 5 | ||||
-rwxr-xr-x | tools/licenses.py | 1 |
4 files changed, 31 insertions, 1 deletions
@@ -414,6 +414,9 @@ deps_os = { "src/third_party/WebKit/Tools/gdb": Var("webkit_trunk") + "/Tools/gdb@" + Var("webkit_revision"), + + "src/third_party/gold": + "/trunk/deps/third_party/gold@120423", }, } diff --git a/build/common.gypi b/build/common.gypi index 418ce89..d815a4c 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -376,6 +376,15 @@ }, { 'enable_plugin_installation%': 1, }], + + # Set to 0 to not use third_party/gold as the linker. + # On by default for x64 Linux. Off for ChromeOS as cross-compiling + # makes things complicated. + ['chromeos==0 and host_arch=="x64"', { + 'linux_use_gold_binary%': 1, + }, { + 'linux_use_gold_binary%': 0, + }], ], }, @@ -434,6 +443,7 @@ 'enable_web_intents%': '<(enable_web_intents)', 'enable_web_intents_tag%': '<(enable_web_intents_tag)', 'enable_plugin_installation%': '<(enable_plugin_installation)', + 'linux_use_gold_binary%': '<(linux_use_gold_binary)', 'use_canvas_skia_skia%': '<(use_canvas_skia_skia)', # Whether to build for Wayland display server 'use_wayland%': 0, @@ -1981,6 +1991,19 @@ 'defines': ['KEEP_SHADOW_STACKS'], 'cflags': ['-finstrument-functions'], }], + ['linux_use_gold_binary==1', { + 'variables': { + # We pass the path to gold to the compiler. gyp leaves + # unspecified what the cwd is when running the compiler, + # so the normal gyp path-munging fails us. This hack + # gets the right path. + 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold', + }, + 'ldflags': [ + # Put our gold binary in the search path for the linker. + '-B<(gold_path)', + ], + }], ], }, }], diff --git a/tools/checkperms/checkperms.py b/tools/checkperms/checkperms.py index 66ed019..539f397 100755 --- a/tools/checkperms/checkperms.py +++ b/tools/checkperms/checkperms.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Copyright (c) 2012 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. @@ -60,6 +60,9 @@ WHITELIST_FILES = [ '/o3d/gypbuild', '/o3d/installer/linux/debian.in/rules', '/third_party/icu/source/runconfigureicu', + '/third_party/gold/gold64', + '/third_party/gold/ld', + '/third_party/gold/ld.bfd', '/third_party/lcov/bin/gendesc', '/third_party/lcov/bin/genhtml', '/third_party/lcov/bin/geninfo', diff --git a/tools/licenses.py b/tools/licenses.py index d724540..0889d06 100755 --- a/tools/licenses.py +++ b/tools/licenses.py @@ -63,6 +63,7 @@ PRUNE_PATHS = set([ # Used for development and test, not in the shipping product. os.path.join('third_party','bidichecker'), os.path.join('third_party','cygwin'), + os.path.join('third_party','gold'), os.path.join('third_party','lighttpd'), os.path.join('third_party','mingw-w64'), os.path.join('third_party','pefile'), |