2015-01-12 31 views
0

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

基本上似乎有一些遗留在早期版本的文件,所以问题是我如何删除它,优雅,即不是与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! 

回答

1

LLVM构建系统无法为此问题提供解决方案。你可以从头开始用干净的来源或使用一些Linux shell巫术来摆脱所有.gen文件。

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的或忍者。如果它抱怨文件丢失,则从原始LLVM源代码复制丢失的文件。