Index: build/toolchain/gcc_toolchain.gni |
diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni |
index 90f77793f397c6d2680b969e2a0435970dfcbb27..e2b98e06939138f45a7f34a65990a4efdcc7630a 100644 |
--- a/build/toolchain/gcc_toolchain.gni |
+++ b/build/toolchain/gcc_toolchain.gni |
@@ -9,7 +9,7 @@ import("//build/toolchain/goma.gni") |
import("//build/toolchain/toolchain.gni") |
# This value will be inherited in the toolchain below. |
-if (is_lto) { |
+if (allow_posix_link_time_opt || is_cfi) { |
concurrent_links = |
exec_script("get_concurrent_links.py", [ "--lto" ], "value") |
} else { |
@@ -217,7 +217,8 @@ template("gcc_toolchain") { |
tool("alink") { |
rspfile = "{{output}}.rsp" |
arflags = "" |
- if (is_lto && invoker.toolchain_os != "nacl") { |
+ if ((allow_posix_link_time_opt || is_cfi) && |
+ invoker.toolchain_os != "nacl") { |
gold_plugin_path = rebase_path( |
"//third_party/llvm-build/Release+Asserts/lib/LLVMgold.so", |
root_build_dir) |