r365825 - [clang-shlib] Fix clang-shlib for PRIVATE dependencies

Shoaib Meenai via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 12 08:32:23 PDT 2019


Oops, sorry about the breakage.

Chris, aren't BUILD_SHARED_LIBS and the combined Clang dylib incompatible? Should we disable building the latter if the former is set?

From: Alex Bradbury <asb at lowrisc.org>
Date: Friday, July 12, 2019 at 2:02 AM
To: Shoaib Meenai <smeenai at fb.com>
Cc: cfe-commits <cfe-commits at lists.llvm.org>
Subject: Re: r365825 - [clang-shlib] Fix clang-shlib for PRIVATE dependencies

On Thu, 11 Jul 2019 at 22:20, Shoaib Meenai via cfe-commits
<cfe-commits at lists.llvm.org<mailto:cfe-commits at lists.llvm.org>> wrote:

Author: smeenai
Date: Thu Jul 11 14:20:38 2019
New Revision: 365825

URL: https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D365825-26view-3Drev&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=ETCU2JhfBcjWz-nbe6LUVSRQR0T1f3wCzxLIhKlMmQo&s=R9NSZG1XQDVSiE0wJUgb1kMUrG6bJkG3v5GDcTdkpAk&e=
Log:
[clang-shlib] Fix clang-shlib for PRIVATE dependencies

Any static library with a PRIVATE dependency ends up with a
$<LINK_ONLY:...> generator expression in its INTERFACE_LINK_LIBRARIES,
which won't be evaluated by the $<TARGET_PROPERTY:...>, so we end up
with an unevaluated generator expression in the generated build file and
Ninja chokes on the dollar sign. Just use the static library directly
for its dependencies instead of trying to propagate dependencies
manually.

Differential Revision: https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.llvm.org_D64579&d=DwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=ETCU2JhfBcjWz-nbe6LUVSRQR0T1f3wCzxLIhKlMmQo&s=mutN2zF1KixMEVFjNzG_Q7iVJzG5ECbrU4tX3AKWLVQ&e=

This seems to break a -DBUILD_SHARED_LIBS build for me. It fails at
the point of linking lib/libclang_shared.so.9svn with errors like:
ld.lld: error: undefined symbol: llvm::llvm_unreachable_internal(char
const*, char const*, unsigned int)
referenced by Attributes.cpp:34 (/home/asb/llvm-project/clang/lib/Basic/Attributes.cpp:34)
               tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Attributes.cpp.o:(clang::attr::getSubjectMatchRuleSpelling(clang::attr::SubjectMatchRule))

ld.lld: error: undefined symbol: llvm::llvm_unreachable_internal(char
const*, char const*, unsigned int)
referenced by TargetCXXABI.h:168 (/home/asb/llvm-project/clang/include/clang/Basic/TargetCXXABI.h:168)
               tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Attributes.cpp.o:(clang::TargetCXXABI::isMicrosoft() const)

ld.lld: error: undefined symbol: llvm::llvm_unreachable_internal(char
const*, char const*, unsigned int)
referenced by TargetCXXABI.h:149 (/home/asb/llvm-project/clang/include/clang/Basic/TargetCXXABI.h:149)
               tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Attributes.cpp.o:(clang::TargetCXXABI::isItaniumFamily() const)

ld.lld: error: undefined symbol: llvm::EnableABIBreakingChecks
referenced by Attributes.cpp
               tools/clang/lib/Basic/CMakeFiles/obj.clangBasic.dir/Attributes.cpp.o:(llvm::VerifyEnableABIBreakingChecks)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190712/a384f5ec/attachment-0001.html>


More information about the cfe-commits mailing list