| Index: src/trusted/service_runtime/linux/BUILD.gn
|
| diff --git a/src/trusted/service_runtime/linux/BUILD.gn b/src/trusted/service_runtime/linux/BUILD.gn
|
| index 37cc61fa1059ed8af6cc12fc2c86235f8eed72cd..ce2923be8d8313527028d442c62ccca664774dd2 100644
|
| --- a/src/trusted/service_runtime/linux/BUILD.gn
|
| +++ b/src/trusted/service_runtime/linux/BUILD.gn
|
| @@ -15,8 +15,20 @@
|
| # Gold for the link, so use_gold=true is a false statement and might
|
| # cause other problems.
|
|
|
| -here = get_label_info(".", "dir")
|
| -bootstrap_toolchain = here + "/toolchain:nacl_bootstrap_" + target_cpu
|
| +# TODO(dpranke): There needs to be a better way to determine if
|
| +# we are using the custom CrOS toolchains, but for now we check is_clang,
|
| +# which is the same way we check in //build/config/BUILDCONFIG.gn.
|
| +_is_cros_target_toolchain = is_chromeos && !is_clang
|
| +if (target_os == "chromeos") {
|
| + import("//build/toolchain/cros_toolchain.gni")
|
| +}
|
| +
|
| +if (_is_cros_target_toolchain) {
|
| + bootstrap_toolchain = "//build/toolchain/cros:nacl_bootstrap"
|
| +} else {
|
| + here = get_label_info(".", "dir")
|
| + bootstrap_toolchain = here + "/toolchain:nacl_bootstrap_" + target_cpu
|
| +}
|
|
|
| if (current_toolchain == bootstrap_toolchain) {
|
| bootstrap_lib_path = "$target_out_dir/libnacl_bootstrap_lib.a"
|
| @@ -42,7 +54,9 @@ if (current_toolchain == bootstrap_toolchain) {
|
| linker_emulation = "elf32ltsmip"
|
| }
|
|
|
| - if (is_android) {
|
| + if (_is_cros_target_toolchain) {
|
| + compiler = cros_target_cxx
|
| + } else if (is_android) {
|
| compiler = "g++"
|
| } else if (current_cpu == "arm") {
|
| compiler = "arm-linux-gnueabihf-g++"
|
| @@ -50,11 +64,6 @@ if (current_toolchain == bootstrap_toolchain) {
|
| compiler = "g++"
|
| }
|
|
|
| - if (target_os == "chromeos" && defined(cros_target_cxx) &&
|
| - cros_target_cxx != "") {
|
| - compiler = cros_target_cxx
|
| - }
|
| -
|
| static_library("nacl_bootstrap_lib") {
|
| # This code has very specific requirements related to its static
|
| # linking and minimal libc use. It cannot support the normal variety
|
|
|