Commit d6665fc4 authored by Seba Gamboa's avatar Seba Gamboa

Add optional params to toolchain configuration

parent 98762c5a
...@@ -26,8 +26,8 @@ module MRuby ...@@ -26,8 +26,8 @@ module MRuby
MRuby::Toolchain.toolchains[@name] = self MRuby::Toolchain.toolchains[@name] = self
end end
def setup(conf) def setup(conf,params={})
conf.instance_eval(&@initializer) conf.instance_exec(conf, params, &@initializer)
end end
def self.load def self.load
...@@ -158,10 +158,10 @@ EOS ...@@ -158,10 +158,10 @@ EOS
@enable_bintest @enable_bintest
end end
def toolchain(name) def toolchain(name, params={})
tc = Toolchain.toolchains[name.to_s] tc = Toolchain.toolchains[name.to_s]
fail "Unknown #{name} toolchain" unless tc fail "Unknown #{name} toolchain" unless tc
tc.setup(self) tc.setup(self, params)
@toolchains.unshift name.to_s @toolchains.unshift name.to_s
end end
......
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