summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-03 18:23:54 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-03 18:23:54 +0000
commitf6187f444128332e932e059b36556a41b9455d9b (patch)
treea7f9438cd0b5560426cbd01fe126b5351956bd1d /build
parentb0d7aa366edee8b275be64678728c5add3515cdd (diff)
downloadchromium_src-f6187f444128332e932e059b36556a41b9455d9b.zip
chromium_src-f6187f444128332e932e059b36556a41b9455d9b.tar.gz
chromium_src-f6187f444128332e932e059b36556a41b9455d9b.tar.bz2
linux: use an in-tree copy of gold by default
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@120356 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r--build/common.gypi23
1 files changed, 23 insertions, 0 deletions
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)',
+ ],
+ }],
],
},
}],