Commit 98d0f1b9 authored by KOBAYASHI Shuji's avatar KOBAYASHI Shuji

Improve determining C++ compiler in `tasks/toolchains/gcc.rake`

* Consider CC envvar as C compiler on which to make the decision.
* Consider the case where C compiler is `ccache gcc`, etc.
parent fb028b47
......@@ -6,7 +6,7 @@ MRuby::Toolchain.new(:gcc) do |conf, params|
[conf.cc, conf.objc, conf.asm, conf.cxx].each do |compiler|
if compiler == conf.cxx
compiler.command = ENV['CXX'] || default_command.sub(/cc|$/, '++')
compiler.command = ENV['CXX'] || conf.cc.command.sub(/g\Kcc|$/, '++')
compiler.flags = [ENV['CXXFLAGS'] || ENV['CFLAGS'] || compiler_flags]
else
compiler.command = ENV['CC'] || default_command
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment