如何使用 clang++ 构建 llvm 示例的 ModuleMaker
How to build llvm example's ModuleMaker by using clang++
我正试图从LLVM示例构建ModuleMaker。
当我调用时:
clang++ -g ModuleMaker.cpp `llvm-config --cppflags --ldflags --libs core jit native` -o ModuleMaker
我收到错误消息:
/home/huangered/Desktop/ModuleMaker/main.cpp:59: undefined reference to `llvm::WriteBitcodeToFile(llvm::Module const*, llvm::raw_ostream&)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我该怎么解决这个问题?
clang++ main.cpp `llvm-config --cppflags --ldflags --libs core jit native bitwriter` -o main
好的,我明白了。我应该在llvm配置中添加一个bitwriter组件。
相关文章:
- 如何将 I->getType() 作为参数传递给 llvm 中的 CreateCall?
- 将尾部调用void(i32,..)位转换为llvm::函数以获取FnAttribute
- 是否可以将llvm::FunctionType转换为C/C++原始函数指针
- llvm构建器向基本块添加终止符
- 正在LLVM中检测整数比较条件
- 如何在LLVM中dyn_cast以识别StoreInst?
- 使用 cmake 的 LLVM 构建在 tsan_libdispatch_mac.cc 期间失败; "Error: conflicting types for ..."
- 如何使用 llvm-10 库在C++定义 LLVM 全局值变量?
- 编译 llvm 3.1 时,为什么会出现错误:在">"标记之前预期主表达式
- 如何删除 LLVM 中的不规则分支?
- LLVM | codegen 用于带有命令行选项的程序输入功能
- 编译 llvm 插件时出现问题:llvm/Config/llvm-config.h:没有这样的文件或目录
- 如何检查函数是否在LLVM Instrumentation pass的ModulePass的系统头文件中定义?
- 从macOS Catalina上的源代码编译LLVM(如何解决未找到"stdio.h")
- LLVM 选择找不到函数传递
- LLVM 编译:目标的配方 '../lib/IR/Release+Asserts/Intrinsics.gen.tmp' failed
- LLVM |如何实现逻辑非操作的 IR 代码生成
- 构建 LLVM 后未找到叮当
- CMakeList for ModuleMaker LLVM 示例程序
- 如何使用 clang++ 构建 llvm 示例的 ModuleMaker