Debian Codegraph @

vendor/mruby-source/build_config/host-shared.rb

raw
1 MRuby::Build.new do |conf|
2 # load specific toolchain settings
3
4 # Gets set by the VS command prompts.
5 if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR']
6 toolchain :visualcpp
7 else
8 toolchain :gcc
9 end
10
11 # include the GEM box
12 conf.gembox 'default'
13
14 # C compiler settings
15 conf.cc do |cc|
16 cc.flags = '-fPIC'
17 end
18
19 conf.archiver do |archiver|
20 archiver.command = 'gcc'
21 archiver.archive_options = '-shared -o %{outfile} %{objs}'
22 end
23
24 # file extensions
25 conf.exts do |exts|
26 exts.library = '.so'
27 end
28
29 # file separator
30 # conf.file_separator = '/'
31
32 # Turn on `enable_debug` for better debugging
33 conf.enable_debug
34 conf.enable_bintest
35 conf.enable_test
36 end