Commit b6f7c3ee authored by dpranke@chromium.org's avatar dpranke@chromium.org

Make goma work for the GN build on linux.

This drops the old gyp-compatible settings and wires up the
Linux and Android toolchains to be goma-aware. Mac and Win can
follow in subsequent CLs.

R=brettw@chromium.org, thakis@chromium.org
BUG=394501

Review URL: https://codereview.chromium.org/397173004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283971 0039d316-1c4b-4281-b951-d872f2087c98
parent 371e6f63
......@@ -20,12 +20,3 @@ declare_args() {
goma_dir = getenv("HOME") + "/goma"
}
}
if (use_goma) {
# Define the toolchain for the GYP build when using goma.
make_goma_global_settings =
"['CC_wrapper', '$goma_dir/gomacc']," +
"['CXX_wrapper', '$goma_dir/gomacc']," +
"['CC.host_wrapper', '$goma_dir/gomacc']," +
"['CXX.host_wrapper', '$goma_dir/gomacc'],"
}
......@@ -7,9 +7,16 @@ import("//build/toolchain/clang.gni")
import("//build/toolchain/gcc_toolchain.gni")
import("//build/toolchain/goma.gni")
if (use_goma) {
goma_prefix = "$goma_dir/gomacc "
} else {
goma_prefix = ""
}
gcc_toolchain("arm") {
cc = "arm-linux-gnueabi-gcc"
cxx = "arm-linux-gnueabi-g++"
cc = "${goma_prefix}arm-linux-gnueabi-gcc"
cxx = "${goma_prefix}arm-linux-gnueabi-g++"
ar = "arm-linux-gnueabi-ar"
ld = cxx
......@@ -26,8 +33,8 @@ gcc_toolchain("clang_x86") {
prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
root_build_dir)
}
cc = "$prefix/clang"
cxx = "$prefix/clang++"
cc = "${goma_prefix}$prefix/clang"
cxx = "${goma_prefix}$prefix/clang++"
ar = "ar"
ld = cxx
......@@ -38,8 +45,8 @@ gcc_toolchain("clang_x86") {
}
gcc_toolchain("x86") {
cc = "gcc"
cxx = "g++"
cc = "${goma_prefix}gcc"
cxx = "$goma_prefix}g++"
ar = "ar"
ld = cxx
......@@ -57,8 +64,8 @@ gcc_toolchain("clang_x64") {
prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
root_build_dir)
}
cc = "$prefix/clang"
cxx = "$prefix/clang++"
cc = "${goma_prefix}$prefix/clang"
cxx = "${goma_prefix}$prefix/clang++"
ar = "ar"
ld = cxx
......@@ -69,8 +76,8 @@ gcc_toolchain("clang_x64") {
}
gcc_toolchain("x64") {
cc = "gcc"
cxx = "g++"
cc = "${goma_prefix}gcc"
cxx = "${goma_prefix}g++"
ar = "ar"
ld = cxx
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment