7
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

Organization

ruby-llvm をビルドするまでにやること

それほど複雑でもないけど、いつもやっている手順をメモ

checkout

適当なディレクトリに clone

% mkdir RubyLLVM; cd RubyLLVM
% git clone git@github.com:ruby-llvm/ruby-llvm.git
% cd ruby-llvm

bundle install

個人的な好みで、ライブラリや binstubs はプロジェクトの親ディレクトリにインストールしている。

% bundle install --path ../lib --binstubs ../bin
Resolving dependencies...
Using rake 0.9.6
Using docile 1.1.3
...

Build libRubyLLVMSupport and config file

llvm-config にパスが通っている必要がある。

% llvm-config --version
3.4

ext/ruby-llvm-support にある Rakefile を実行

% cd ext/ruby-llvm-support
% ../../../bin/rake
checking for llvm-config... llvm-config
checking for C++ compiler... Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix
clang++
% cd ../..

これで、

  • C バインディングの libRubyLLVMSupport-3.4.dylib
  • 環境情報を集めた lib/llvm/config.rb

が作成される。

Test

% LD_LIBRARY_PATH="`llvm-config --libdir`" ../bin/rake
Run options: --seed 13559

# Running:

.....................................................................................

Finished in 0.630651s, 134.7814 runs/s, 464.5993 assertions/s.

85 runs, 293 assertions, 0 failures, 0 errors, 0 skips
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
7
Help us understand the problem. What are the problem?