Commit 7b6032b3 authored by Peter Collingbourne's avatar Peter Collingbourne Committed by Commit Bot

build: Disable LTO and CFI in host builds.

There isn't much value in enabling these features in host builds,
and they tend to slow the build down significantly.

Bug: 469376
Change-Id: I8a4f7eff30918dea57dc0143e6d5ff6e658a1a84
Reviewed-on: https://chromium-review.googlesource.com/767601Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516134}
parent 5b4a0cb6
......@@ -513,7 +513,7 @@ config("compiler") {
# example by disabling the optimize configuration.
# TODO(pcc): Make this conditional on is_official_build rather than on gn
# flags for specific features.
if (!is_debug && use_thin_lto && !is_nacl) {
if (!is_debug && use_thin_lto && current_toolchain == default_toolchain) {
assert(use_lld || target_os == "chromeos",
"gold plugin only supported with ChromeOS")
......
......@@ -204,7 +204,7 @@ config("default_sanitizer_ldflags") {
ldflags += [ "-fsanitize-coverage=$sanitizer_coverage_flags" ]
}
if (is_cfi && !is_nacl) {
if (is_cfi && current_toolchain == default_toolchain) {
ldflags += [ "-fsanitize=cfi-vcall" ]
if (use_cfi_cast) {
ldflags += [
......@@ -349,7 +349,7 @@ config("link_shared_library") {
config("cfi_flags") {
cflags = []
if (is_cfi && !is_nacl) {
if (is_cfi && current_toolchain == default_toolchain) {
if (!defined(cfi_blacklist_path)) {
cfi_blacklist_path =
rebase_path("//tools/cfi/blacklist.txt", root_build_dir)
......
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