r348915 - Add explicit dependency on clangSerialization for a bunch of components to fix -DBUILD_SHARED_LIBS=on build

Alex Bradbury via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 12 06:38:11 PST 2018


On Wed, 12 Dec 2018 at 08:05, Fangrui Song via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
>
> Author: maskray
> Date: Wed Dec 12 00:02:18 2018
> New Revision: 348915
>
> URL: http://llvm.org/viewvc/llvm-project?rev=348915&view=rev
> Log:
> Add explicit dependency on clangSerialization for a bunch of components to fix -DBUILD_SHARED_LIBS=on build
>
> This is a more thorough fix of rC348911.
> The story about -DBUILD_SHARED_LIBS=on build after rC348907 (Move PCHContainerOperations from Frontend to Serialization) is:
>
> 1. libclangSerialization.so defines PCHContainerReader dtor, ...
> 2. clangFrontend and clangTooling define classes inheriting from PCHContainerReader, thus their DSOs have undefined references on PCHContainerReader dtor
> 3. Components depending on either clangFrontend or clangTooling cannot be linked unless they have explicit dependency on clangSerialization due to the default linker option -z defs. The explicit dependency could be avoided if libclang{Frontend,Tooling}.so had these undefined references.
>
> This patch adds the explicit dependency on clangSerialization to make them build.

Hi Fangrui. My shared library build ran into issues when linking
libclangHandleCXX.so. I committed rC348929 to fix that.

Best,

Alex


More information about the cfe-commits mailing list