Fix mruby build
Copy build_config.rb to build directory because now build_config.rb.lock is created along side it. Define toolchain depending on CC environment variable.
This commit is contained in:
parent
7df73a5d90
commit
181a007a34
|
@ -54,7 +54,10 @@ EXTRA_DIST += build_config.rb mruby/*
|
|||
.PHONY: all-local clean mruby
|
||||
|
||||
mruby:
|
||||
MRUBY_CONFIG="${srcdir}/build_config.rb" \
|
||||
mkdir -p "${abs_builddir}/mruby/build"
|
||||
diff "${srcdir}/build_config.rb" "${abs_builddir}/mruby/build/build_config.rb" >& /dev/null || \
|
||||
cp "${srcdir}/build_config.rb" "${abs_builddir}/mruby/build"
|
||||
MRUBY_CONFIG="${abs_builddir}/mruby/build/build_config.rb" \
|
||||
BUILD_DIR="${abs_builddir}/mruby/build" \
|
||||
INSTALL_DIR="${abs_builddir}/mruby/build/install/bin" \
|
||||
CC="${CC}" CXX="$(firstword $(CXX))" LD="${LD}" \
|
||||
|
@ -66,7 +69,7 @@ mruby:
|
|||
all-local: mruby
|
||||
|
||||
clean-local:
|
||||
MRUBY_CONFIG="${srcdir}/build_config.rb" \
|
||||
MRUBY_CONFIG="${abs_builddir}/mruby/build/build_config.rb" \
|
||||
BUILD_DIR="${abs_builddir}/mruby/build" \
|
||||
"${srcdir}/mruby/minirake" -f "${srcdir}/mruby/Rakefile" clean
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
MRuby::Build.new do |conf|
|
||||
# TODO use same compilers configured in configure script
|
||||
toolchain :clang
|
||||
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 destory C++ object allocated on stack.
|
||||
|
|
Loading…
Reference in New Issue