LLVM构建:从工作构建复制的源

问题描述 投票:0回答:4

我正在尝试从另一台机器上的工作副本构建一个LLVM。原始来源是使用configuremake构建的。但是,在新系统上,相同的构建方法失败了(我尝试过make clean)。我尝试了cmake选项,它说如下:

基本上似乎有一些遗留在早期版本中的文件,所以问题是如何删除它,优雅,即不使用linux命令,而是使用LLVM构建系统本身。 make distclean说“没有规则可以制造目标`disctclean'。停止。”

-- The C compiler identification is AppleClang 6.0.0.6000056
-- The CXX compiler identification is AppleClang 6.0.0.6000056
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at CMakeLists.txt:57 (message):
  Apparently there is a previous in-source build,

  probably as the result of running `configure' and `make' on

  /Users/me/scp/llvm_release.

  This may cause problems.  The suspicious files are: 
/Users/me/scp/llvm_release/lib/Target/AArch64/AArch64GenAsmWriter.inc;
...
...
/Users/me/scp/llvm_release/lib/Target/XCore/XCoreGenSubtargetInfo.inc
/Users/me/scp/llvm_release/include/llvm/IR/Intrinsics.gen

 Please clean the source directory.


-- Configuring incomplete, errors occurred!
makefile cmake llvm
4个回答
1
投票

LLVM构建系统不提供此问题的解决方案。您可以从头开始使用干净的源代码或使用一些Linux shell voodoo来摆脱所有.gen文件。


0
投票

这就是为什么我们在这里的指示中使用单独的构建目录的一个原因:

http://llvm.org/docs/GettingStarted.html#getting-started-quickly-a-summary

最简单的方法是使用一组干净的源重新启动,并避免在源目录中使用configure和make。


0
投票

如果您使用源代码管理检查了源代码,则可以使用它来删除所有未跟踪的文件并重置所有已修改的文件。


0
投票

只需删除提到的文件:

Users/me/scp/llvm_release/lib/Target/AArch64/AArch64GenAsmWriter.inc;
...
...
/Users/me/scp/llvm_release/lib/Target/XCore/XCoreGenSubtargetInfo.inc
/Users/me/scp/llvm_release/include/llvm/IR/Intrinsics.gen

然后再次运行make或cmake或ninja。如果它抱怨文件丢失,则从原始LLVM源代码中复制丢失的文件。

© www.soinside.com 2019 - 2024. All rights reserved.