summaryrefslogtreecommitdiffhomepage
path: root/tasks
diff options
context:
space:
mode:
authortake_cheeze <[email protected]>2014-06-29 20:32:12 +0900
committertake_cheeze <[email protected]>2014-06-29 20:32:12 +0900
commitef57fd55fb26c022e79228f9b24177185c2f886e (patch)
tree2227d3c9beb88f9a8735cd9311e60f4377ad4e36 /tasks
parent618ef17c8c5a623f4da006954c5e9e21dacd9144 (diff)
downloadmruby-ef57fd55fb26c022e79228f9b24177185c2f886e.tar.gz
mruby-ef57fd55fb26c022e79228f9b24177185c2f886e.zip
Add method `toolchains` and `primary_toolchain` to `MRuby::Build`.
* To check imported toolchains for setting up toolchain specific things. * `primary_toolchain` returns the main toolchain name of the build.
Diffstat (limited to 'tasks')
-rw-r--r--tasks/mruby_build.rake8
1 files changed, 7 insertions, 1 deletions
diff --git a/tasks/mruby_build.rake b/tasks/mruby_build.rake
index 09175d533..06bb2a4e6 100644
--- a/tasks/mruby_build.rake
+++ b/tasks/mruby_build.rake
@@ -44,7 +44,7 @@ module MRuby
include Rake::DSL
include LoadGems
attr_accessor :name, :bins, :exts, :file_separator, :build_dir, :gem_clone_dir
- attr_reader :libmruby, :gems
+ attr_reader :libmruby, :gems, :toolchains
attr_writer :enable_bintest
COMPILERS = %w(cc cxx objc asm)
@@ -84,6 +84,7 @@ module MRuby
@build_mrbtest_lib_only = false
@cxx_abi_enabled = false
@cxx_exception_disabled = false
+ @toolchains = []
MRuby.targets[@name] = self
end
@@ -124,6 +125,11 @@ module MRuby
tc = Toolchain.toolchains[name.to_s]
fail "Unknown #{name} toolchain" unless tc
tc.setup(self)
+ @toolchains.unshift name.to_s
+ end
+
+ def primary_toolchain
+ @toolchains.first
end
def root