Commit f9d27e40 authored by Ben Pastene's avatar Ben Pastene Committed by Commit Bot

Default to using Chrome's clang for CrOS's host & v8_snapshot toolchains.

All uses of Simple Chrome currently already do this:
https://cs.chromium.org/chromium/src/third_party/chromite/cli/cros/cros_chrome_sdk.py?rcl=8b42807c6f1e5b2a046695f363227138f56db6cb&l=999

While the ebuild explicitly overwrites the host toolchain with the host
toolchain in the chroot:
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/aeeb6096850b8fe779d87b83a5498160e25a3ffa/chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild#907

So this should have no effect on ebuilds of chrome, while letting us
delete parts of simeplchrome's chromite code.

Bug: 937821
Change-Id: Ic589c948407c6dd34bd67e95520cc05ed84740b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1976284Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Reviewed-by: default avatarGeorge Burgess <gbiv@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726579}
parent a0b9cb9e
...@@ -107,6 +107,9 @@ gcc_toolchain("host") { ...@@ -107,6 +107,9 @@ gcc_toolchain("host") {
if (cxx != get_path_info(cxx, "file") && string_replace(cxx, " ", "") == cxx) { if (cxx != get_path_info(cxx, "file") && string_replace(cxx, " ", "") == cxx) {
cxx = rebase_path(cxx, root_build_dir) cxx = rebase_path(cxx, root_build_dir)
} }
if (ar != get_path_info(ar, "file") && string_replace(ar, " ", "") == ar) {
ar = rebase_path(ar, root_build_dir)
}
ld = cxx ld = cxx
if (cros_host_ld != "") { if (cros_host_ld != "") {
ld = cros_host_ld ld = cros_host_ld
...@@ -146,6 +149,9 @@ gcc_toolchain("v8_snapshot") { ...@@ -146,6 +149,9 @@ gcc_toolchain("v8_snapshot") {
if (cxx != get_path_info(cxx, "file") && string_replace(cxx, " ", "") == cxx) { if (cxx != get_path_info(cxx, "file") && string_replace(cxx, " ", "") == cxx) {
cxx = rebase_path(cxx, root_build_dir) cxx = rebase_path(cxx, root_build_dir)
} }
if (ar != get_path_info(ar, "file") && string_replace(ar, " ", "") == ar) {
ar = rebase_path(ar, root_build_dir)
}
ld = cxx ld = cxx
if (cros_v8_snapshot_ld != "") { if (cros_v8_snapshot_ld != "") {
ld = cros_v8_snapshot_ld ld = cros_v8_snapshot_ld
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
# cros_target_ar = "x86_64-cros-linux-gnu-gcc-ar" # cros_target_ar = "x86_64-cros-linux-gnu-gcc-ar"
# target_cpu = "x64" # target_cpu = "x64"
import("//build/config/clang/clang.gni")
declare_args() { declare_args() {
# These must be specified for a board-specific build. # These must be specified for a board-specific build.
cros_target_ar = "ar" cros_target_ar = "ar"
...@@ -49,10 +51,10 @@ declare_args() { ...@@ -49,10 +51,10 @@ declare_args() {
cros_target_extra_ldflags = "" cros_target_extra_ldflags = ""
# is_clang is used instead of cros_target_is_clang # is_clang is used instead of cros_target_is_clang
cros_host_ar = "${clang_base_path}/bin/llvm-ar"
cros_host_ar = "ar" cros_host_cc = "${clang_base_path}/bin/clang"
cros_host_cc = "gcc" cros_host_cxx = "${clang_base_path}/bin/clang++"
cros_host_cxx = "g++" cros_host_is_clang = true
cros_host_ld = "" cros_host_ld = ""
cros_host_nm = "" cros_host_nm = ""
cros_host_readelf = "" cros_host_readelf = ""
...@@ -60,11 +62,11 @@ declare_args() { ...@@ -60,11 +62,11 @@ declare_args() {
cros_host_extra_cppflags = "" cros_host_extra_cppflags = ""
cros_host_extra_cxxflags = "" cros_host_extra_cxxflags = ""
cros_host_extra_ldflags = "" cros_host_extra_ldflags = ""
cros_host_is_clang = false
cros_v8_snapshot_ar = "ar" cros_v8_snapshot_ar = "${clang_base_path}/bin/llvm-ar"
cros_v8_snapshot_cc = "gcc" cros_v8_snapshot_cc = "${clang_base_path}/bin/clang"
cros_v8_snapshot_cxx = "g++" cros_v8_snapshot_cxx = "${clang_base_path}/bin/clang++"
cros_v8_snapshot_is_clang = true
cros_v8_snapshot_ld = "" cros_v8_snapshot_ld = ""
cros_v8_snapshot_nm = "" cros_v8_snapshot_nm = ""
cros_v8_snapshot_readelf = "" cros_v8_snapshot_readelf = ""
...@@ -72,7 +74,6 @@ declare_args() { ...@@ -72,7 +74,6 @@ declare_args() {
cros_v8_snapshot_extra_cppflags = "" cros_v8_snapshot_extra_cppflags = ""
cros_v8_snapshot_extra_cxxflags = "" cros_v8_snapshot_extra_cxxflags = ""
cros_v8_snapshot_extra_ldflags = "" cros_v8_snapshot_extra_ldflags = ""
cros_v8_snapshot_is_clang = false
cros_nacl_bootstrap_extra_cflags = "" cros_nacl_bootstrap_extra_cflags = ""
cros_nacl_bootstrap_extra_cppflags = "" cros_nacl_bootstrap_extra_cppflags = ""
......
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