Page MenuHomePhabricator

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

Authored by anhtuyen on Fri, Nov 20, 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

Unit TestsFailed

TimeTest
380 mslinux > HWAddressSanitizer-x86_64.TestCases::sizes.cpp
Script: -- : 'RUN: at line 3'; /mnt/disks/ssd0/agent/llvm-project/build/./bin/clang --driver-mode=g++ -m64 -gline-tables-only -fsanitize=hwaddress -fuse-ld=lld -mcmodel=large -mllvm -hwasan-globals -mllvm -hwasan-use-short-granules -mllvm -hwasan-instrument-landing-pads=0 -mllvm -hwasan-instrument-personality-functions /mnt/disks/ssd0/agent/llvm-project/compiler-rt/test/hwasan/TestCases/sizes.cpp -nostdlib++ -lstdc++ -o /mnt/disks/ssd0/agent/llvm-project/build/projects/compiler-rt/test/hwasan/X86_64/TestCases/Output/sizes.cpp.tmp

Event Timeline

anhtuyen created this revision.Fri, Nov 20, 9:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptFri, Nov 20, 9:48 PM
anhtuyen requested review of this revision.Fri, Nov 20, 9:48 PM
anhtuyen edited the summary of this revision. (Show Details)Fri, Nov 20, 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)Sat, Nov 21, 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.Sat, Nov 21, 7:22 AM

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