最終更新:2013-02-27 (水) 17:32:09 (4069d)  

LLVM/インストール
Top / LLVM / インストール

http://clang.llvm.org/get_started.html

Linux

  • svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
    
    cd llvm/tools
    svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
    cd ../..
    
    mkdir build #(for building without polluting the source dir)
    cd build
    ../llvm/configure
    make

make中にエラーが出る場合

  • 下記のエラーの場合はリンク中のメモリ不足らしい
    llvm[4]: Linking Debug+Asserts executable clang
    collect2: error: ld terminated with signal 9 [Killed]
    make[4]: *** [/home/tokkyo/build/Debug+Asserts/bin/clang] Error 1
    llvm[4]: Linking Debug+Asserts executable clang
    collect2: エラー: ld シグナル 9 [強制終了] で終了させられました
    make[4]: *** [/home/tokkyo/build/Debug+Asserts/bin/clang] エラー 1
  • RAM:1GB/スワップ1GBだと出た
  • RAM:2GB/スワップ1GBでも出た
  • 見てたら3.3GBほどメモリが必要っぽい。

Windows

必要なもの

メモ

手順

  • rem Checkout LLVM:
    svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
    rem Checkout Clang:
    cd llvm\tools
    svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
    
    rem Run CMake to generate the Visual Studio solution and project files:
    rem back to where you started
    cd ..\..
    rem for building without polluting the source dir
    mkdir build
    cd build
    rem if you are using Visual Studio 2010:
    cmake -G "Visual Studio 10" ..\llvm
    rem The above, if successful, will have created an LLVM.sln file in the build directory.

古いらしい

メモ