Chromium Code Reviews| 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..52c298246d60096945aa021542738348a6b4bcc6 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. |
|
Roland McGrath
2016/06/22 19:29:48
If the same check is done in BUILDCONFIG.gn alread
|
| +if (target_os == "chromeos") { |
| + import("//build/toolchain/cros_toolchain.gni") |
| + _is_cros_target_toolchain = !is_clang |
| +} |
| + |
| +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) && |
|
Dirk Pranke
2016/06/22 01:38:27
This shouldn't have really worked before, since cr
|
| - 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 |