build: When targeting Android with Clang, use llvm-ar instead of NDK ar.

Without this, archives will be missing symbol tables when LTO is
enabled, which can lead to link errors.

Bug: 469376
Change-Id: I14ac52cd692d73d4773005071881463b2c60d23f
Reviewed-on: https://chromium-review.googlesource.com/719351
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#508851}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 508d46cc2897daa914fe9454000d8a8bc3eddbd2
This commit is contained in:
Peter Collingbourne 2017-10-13 22:32:20 +00:00 коммит произвёл Commit Bot
Родитель 560b3493f1
Коммит f6d94d10a1
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -56,11 +56,12 @@ template("android_gcc_toolchain") {
_prefix = rebase_path("$clang_base_path/bin", root_build_dir)
cc = "$_prefix/clang"
cxx = "$_prefix/clang++"
ar = "$_prefix/llvm-ar"
} else {
cc = "${_tool_prefix}gcc"
cxx = "${_tool_prefix}g++"
ar = _tool_prefix + "ar"
}
ar = _tool_prefix + "ar"
ld = cxx
readelf = _tool_prefix + "readelf"
nm = _tool_prefix + "nm"