Index: build/common.gypi |
diff --git a/build/common.gypi b/build/common.gypi |
index 161464c9237c8cf41af138d9243807263660b675..c16f37dec7a20c6588961762f330edc7782f3cab 100644 |
--- a/build/common.gypi |
+++ b/build/common.gypi |
@@ -392,6 +392,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, |
+ }], |
], |
}, |
@@ -453,6 +462,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, |
@@ -2000,6 +2010,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', |
Nico
2012/02/01 00:15:55
Would '<(DEPTH)/third_party/gold' work as well?
|
+ }, |
+ 'ldflags': [ |
+ # Put our gold binary in the search path for the linker. |
+ '-B<(gold_path)', |
+ ], |
+ }], |
], |
}, |
}], |