-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Milestone
Description
Building with -DLLVM_LINK_LLVM_DYLIB=ON causes the failures below. Is there another way to get the kind of behavior we get from LLVM_LINK_LLVM_DYLIB / CLANG_LINK_LLVM_DYLIB - reference - with eld?
I want eld to be linked against the just-built libLLVM.so, ideally in the same build where I am doing this with the other binutils included in the llvm monorepo. If this is not yet supported, can we add an ELD_LINK_LLVM_DYLIB that causes this behavior?
+ cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../install_eld -DLLVM_LINK_LLVM_DYLIB:BOOL=ON -DLLVM_ENABLE_ASSERTIONS:BOOL=ON -DLLVM_ENABLE_EXPENSIVE_CHECKS:BOOL=ON -DLLVM_ENABLE_PROJECTS=llvm -DLLVM_EXTERNAL_PROJECTS=eld -DLLVM_EXTERNAL_ELD_SOURCE_DIR=/home/brian/src/toolchain_for_hexagon/llvm-project/eld '-DLLVM_TARGETS_TO_BUILD=ARM;AArch64;RISCV;Hexagon;X86' '-DELD_TARGETS_TO_BUILD=ARM;AArch64;RISCV;Hexagon;X86' -DLLVM_ENABLE_LLD=ON -DLLVM_ENABLE_LIBCXX=ON -B ./obj_dylib_eld -S ./llvm-project/llvm
-- The C compiler identification is Clang 14.0.0
-- The CXX compiler identification is Clang 14.0.0
-- The ASM compiler identification is Clang with GNU-like command-line
-- Found assembler: /opt/clang+llvm-14.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/clang+llvm-14.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
...
-- Use LLVM_VENDOR_VERSION to set more vendor version
-- ELD built with support for RISCV
-- ELD built with support for Hexagon
-- ELD built with support for X86
-- Setting up build of ELD for Unix
CMake Error at /home/brian/src/toolchain_for_hexagon/llvm-project/eld/lib/LayoutMap/CMakeLists.txt:4 (target_link_libraries):
The keyword signature for target_link_libraries has already been used with
the target "ELDLayout". All uses of target_link_libraries with a target
must be either all-keyword or all-plain.
The uses of the keyword signature are here:
* cmake/modules/AddLLVM.cmake:775 (target_link_libraries)
-- Targeting Linker for ARM
CMake Error at /home/brian/src/toolchain_for_hexagon/llvm-project/eld/lib/Target/ARM/TargetInfo/CMakeLists.txt:2 (target_link_libraries):
The keyword signature for target_link_libraries has already been used with
the target "ELDARMTargetInfo". All uses of target_link_libraries with a
target must be either all-keyword or all-plain.
The uses of the keyword signature are here:
* cmake/modules/AddLLVM.cmake:775 (target_link_libraries)
-- Targeting Linker for AArch64
CMake Error at /home/brian/src/toolchain_for_hexagon/llvm-project/eld/lib/Target/AArch64/TargetInfo/CMakeLists.txt:2 (target_link_libraries):
The keyword signature for target_link_libraries has already been used with
the target "ELDAArch64TargetInfo". All uses of target_link_libraries with
a target must be either all-keyword or all-plain.
The uses of the keyword signature are here:
* cmake/modules/AddLLVM.cmake:775 (target_link_libraries)
...