Index: build/toolchain/gcc_toolchain.gni |
diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni |
index bb3846c3bb6bd817cd9b00ab770142c909203ca6..a9f73f7be6da22da9f69bdcda7ba22455f28ddab 100644 |
--- a/build/toolchain/gcc_toolchain.gni |
+++ b/build/toolchain/gcc_toolchain.gni |
@@ -2,6 +2,7 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
+import("//build/config/sanitizers/sanitizers.gni") |
import("//build/toolchain/toolchain.gni") |
# This value will be inherited in the toolchain below. |
@@ -173,7 +174,14 @@ template("gcc_toolchain") { |
tool("alink") { |
rspfile = "{{output}}.rsp" |
- command = "rm -f {{output}} && $ar rcs {{output}} @$rspfile" |
+ arflags = "" |
+ if (is_cfi && invoker.toolchain_os != "nacl") { |
+ gold_plugin_path = rebase_path( |
+ "//third_party/llvm-build/Release+Asserts/lib/LLVMgold.so", |
+ root_build_dir) |
+ arflags = "--plugin $gold_plugin_path" |
+ } |
+ command = "rm -f {{output}} && $ar rcs $arflags {{output}} @$rspfile" |
description = "AR {{output}}" |
rspfile_content = "{{inputs}}" |
outputs = [ |