2015-01-12 77 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源代碼複製丟失的文件。