mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Remove use of define_singleton_method.
This commit is contained in:
@@ -30,10 +30,11 @@ MRuby::Toolchain.new(:gcc) do |conf|
|
||||
end
|
||||
|
||||
[[conf.cc, 'c'], [conf.cxx, 'c++']].each do |cc, lang|
|
||||
cc.define_singleton_method(:header_search_paths) do
|
||||
cc.instance_variable_set :@header_search_language, lang
|
||||
def cc.header_search_paths
|
||||
if @header_search_command != command
|
||||
result = `echo | #{build.filename command} -x#{lang} -Wp,-v - -fsyntax-only 2>&1`
|
||||
result = `echo | #{command} -x#{lang} -Wp,-v - -fsyntax-only 2>&1` if $?.exitstatus != 0
|
||||
result = `echo | #{build.filename command} -x#{@header_search_language} -Wp,-v - -fsyntax-only 2>&1`
|
||||
result = `echo | #{command} -x#{@header_search_language} -Wp,-v - -fsyntax-only 2>&1` if $?.exitstatus != 0
|
||||
return include_paths if $?.exitstatus != 0
|
||||
|
||||
@frameworks = []
|
||||
|
||||
Reference in New Issue
Block a user