问题描述
我编译和安装LLVM从debian在几个星期前debian wheezy(配置& make),现在试图从源码编译。
AFAICC,llvm-mutate遵循cmake 。
I compiled and installed LLVM from trunk on debian wheezy some weeks ago (configure & make) and now tried to out of source compile the llvm-mutate pass.AFAICC, llvm-mutate follows the cmake out of source pass build instructions.
尝试建立llvm-mutate时
When trying to build llvm-mutate
mkdir build
cd build
cmake -DCMAKE_MODULE_PATH=/usr/local/share/llvm/cmake ../
我得到:
- 忽略Mutate - 此平台不支持可加载模块。
-- Mutate ignored -- Loadable modules not supported on this platform.
hmm?
opt和可加载的传递(在llvm_trunk / build / Debug + Asserts / lib / xxx.so)存在和工作(已使用configure& make,而不是cmake编译)。
hmm?opt and the loadable passes (at llvm_trunk/build/Debug+Asserts/lib/xxx.so) are present and work (have been compiled using configure & make, not cmake).
所以这个问题似乎与cmake有关?
有人遇到这样的问题,在win上使用cygwin:
So this problem seems to be related to cmake?Someone else faced such problems, howver on Win using cygwin: here
任何想法?
Thx
Alex
Any idea?ThxAlex
推荐答案
AddLLVM
模块需要一些先决条件。添加到CMakeLists.txt:
AddLLVM
cmake module needs some prerequisites. Add to CMakeLists.txt:
# AddLLVM needs these
set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib)
include(HandleLLVMOptions) # important: matches compiler flags to LLVM/Clang build
include(AddLLVM)
一些灵感来自。
这篇关于LLVM超出源代码构建:不支持可加载模块(在Linux上)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!