mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user