This is an archive of the discontinued LLVM Phabricator instance.

Add missing dependencies, which caused link failure when building with -DBUILD_SHARED_LIBS:BOOL=ON
AbandonedPublic

Authored by anhtuyen on Nov 20 2020, 9:48 PM.

Details

Summary

After the integration of the following commit

commit 9218ff50f93085d0a16a974db28ca8f14bc66f64
Author: serge-sans-paille <sguelton@redhat.com>
Date:   Fri Oct 9 18:41:21 2020 +0200

    llvmbuildectomy - replace llvm-build by plain cmake

    No longer rely on an external tool to build the llvm component layout.

    Instead, leverage the existing `add_llvm_componentlibrary` cmake function and
    introduce `add_llvm_component_group` to accurately describe component behavior.

    These function store extra properties in the created targets. These properties
    are processed once all components are defined to resolve library dependencies
    and produce the header expected by llvm-config.

    Differential Revision: https://reviews.llvm.org/D90848

building llvm with shared libraries will fail due to missing dependencies.

The linker complains that:

lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/LoopUtils.cpp.o: In function `llvm::makeFollowupLoopID(llvm::MDNode*, llvm::ArrayRef<llvm::StringRef>, char const*, bool)':
LoopUtils.cpp:(.text._ZN4llvm18makeFollowupLoopIDEPNS_6MDNodeENS_8ArrayRefINS_9StringRefEEEPKcb+0x198): undefined reference to `llvm::isValueProfMD(llvm::MDNode*, llvm::InstrProfValueKind)'

This patch will add the missing dependencies to resolve the failures like the above.

Diff Detail

Event Timeline

anhtuyen created this revision.Nov 20 2020, 9:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 20 2020, 9:48 PM
anhtuyen requested review of this revision.Nov 20 2020, 9:48 PM
anhtuyen edited the summary of this revision. (Show Details)Nov 20 2020, 10:18 PM
anhtuyen edited the summary of this revision. (Show Details)

Curious enough, I can't reproduce this failure.

anhtuyen edited the summary of this revision. (Show Details)Nov 21 2020, 7:17 AM

Curious enough, I can't reproduce this failure.

Sorry, the problem only appears when I have more code in my local dir. Thus, I close this revision now.

anhtuyen abandoned this revision.Nov 21 2020, 7:22 AM

The error only occurs when I have more code in my local. I close it now.