summaryrefslogtreecommitdiffstats
path: root/third-party/build_config.rb
diff options
context:
space:
mode:
Diffstat (limited to 'third-party/build_config.rb')
-rw-r--r--third-party/build_config.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/third-party/build_config.rb b/third-party/build_config.rb
new file mode 100644
index 0000000..86dd815
--- /dev/null
+++ b/third-party/build_config.rb
@@ -0,0 +1,14 @@
+MRuby::Build.new do |conf|
+ toolchain :clang if ENV['CC'].include? "clang"
+ toolchain :gcc if ENV['CC'].include? "gcc"
+
+ # C++ project needs this. Without this, mruby exception does not
+ # properly destroy C++ object allocated on stack.
+ conf.enable_cxx_exception
+
+ conf.build_dir = ENV['BUILD_DIR']
+
+ # include the default GEMs
+ conf.gembox 'default'
+ conf.gem :core => 'mruby-eval'
+end