LLVM超出源代码构建:不支持可加载模块(在Linux上) [英] LLVM out of source pass build: Loadable modules not supported (on Linux)

查看:214
本文介绍了LLVM超出源代码构建:不支持可加载模块(在Linux上)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编译和安装LLVM从debian在几个星期前debian wheezy(配置& make),现在试图从源码编译 llvm-mutate pass
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? Thx Alex

推荐答案

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上)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆