Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: build/config/compiler/BUILD.gn

Issue 1273133002: Make which gold and binutils used configurable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 9120e66e9d9ad6023ad37cf7670d7d95fef382b2..07583ee7cad1e204afc1386daf325c7ecfe5764b 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -30,6 +30,8 @@ declare_args() {
# only two architectures that are currently checked in). Turn this off when
# you are using a custom toolchain and need to control -B in cflags.
linux_use_bundled_binutils = is_linux && current_cpu == "x64"
+ binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin",
+ root_build_dir)
# Compile in such a way as to enable profiling of the generated code. For
# example, don't omit the frame pointer and leave in symbols.
@@ -46,6 +48,14 @@ declare_args() {
# address space, and it doesn't support cross-compiling).
use_gold = is_linux && current_cpu == "x64"
+ # When we are going to use gold we need to find it.
+ if (use_gold) {
+ gold_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin",
+ root_build_dir)
+ } else {
+ gold_path = ""
+ }
+
# use_debug_fission: whether to use split DWARF debug info
# files. This can reduce link time significantly, but is incompatible
# with some utilities such as icecc and ccache. Requires gold and
@@ -456,8 +466,6 @@ config("compiler") {
ldflags += [ "-pthread" ]
}
if (use_gold) {
- gold_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin",
- root_build_dir)
ldflags += [
"-B$gold_path",
@@ -491,8 +499,6 @@ config("compiler") {
}
if (linux_use_bundled_binutils) {
- binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin",
- root_build_dir)
cflags += [ "-B$binutils_path" ]
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698