-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_config.rb
47 lines (39 loc) · 1.2 KB
/
build_config.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
MRuby::Build.new do |conf|
# load specific toolchain settings
toolchain :gcc
enable_debug
conf.gem :github => 'matsumoto-r/mruby-simplehttp'
conf.gem :github => 'trusterd/mruby-http2'
conf.gem :github => 'iij/mruby-io'
conf.gem :github => 'iij/mruby-dir'
conf.gem :github => 'iij/mruby-socket'
conf.gem :github => 'iij/mruby-pack'
conf.gem :github => 'iij/mruby-process'
conf.gem :github => 'mattn/mruby-onig-regexp'
conf.gem :github => 'mattn/mruby-json'
conf.gem :github => 'kjunichi/mruby-getprocpath'
conf.gem :github => 'ksss/mruby-signal', :branch => 'master'
if RUBY_PLATFORM =~ /linux/i
conf.gem :github => 'kjunichi/mruby-inotify'
conf.gem :github => 'ksss/mruby-file-stat'
end
# include the default GEMs
conf.gembox 'full-core'
# C compiler settings
if RUBY_PLATFORM =~ /linux/i
conf.cc do |cc|
cc.command = ENV['CC'] || 'qrintf gcc'
cc.flags << '-fPIC '
end
# Linker settings
conf.linker do |linker|
linker.flags_after_libraries << '-ljemalloc'
end
end
# when using openssl from brew
if RUBY_PLATFORM =~ /darwin/i
conf.linker do |linker|
linker.option_library_path << ' -L/usr/local/lib/ '
end
end
end