[PATCH] D125399: [gn build] Use llvm-ar when clang_base_path is specified
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 11 09:20:59 PDT 2022
aeubanks created this revision.
aeubanks added a reviewer: thakis.
Herald added a project: All.
aeubanks requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This prevents warnings with use_thinlto like
bfd plugin: LLVM gold plugin has failed to create LTO module: Not an int attribute (Producer: 'LLVM15.0.0git' Reader: 'LLVM 13.0.1')
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D125399
Files:
llvm/utils/gn/build/toolchain/BUILD.gn
Index: llvm/utils/gn/build/toolchain/BUILD.gn
===================================================================
--- llvm/utils/gn/build/toolchain/BUILD.gn
+++ llvm/utils/gn/build/toolchain/BUILD.gn
@@ -174,7 +174,11 @@
unix_toolchain("unix") {
if (current_os != "ios" && current_os != "mac") {
- ar = "ar"
+ if (clang_base_path != "") {
+ ar = rebase_path(clang_base_path, root_build_dir) + "/bin/llvm-ar"
+ } else {
+ ar = "ar"
+ }
}
toolchain_args = {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125399.428691.patch
Type: text/x-patch
Size: 492 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220511/2468d3f6/attachment.bin>
More information about the llvm-commits
mailing list