Defer several build libraries loading until needed

This commit is contained in:
KOBAYASHI Shuji
2019-08-25 09:48:07 +09:00
parent e3f7429173
commit 3110d84ed8
4 changed files with 8 additions and 5 deletions
-2
View File
@@ -10,8 +10,6 @@ $LOAD_PATH << File.join(MRUBY_ROOT, "lib")
# load build systems
require "mruby-core-ext"
require "mruby/build"
require "mruby/gem"
require "mruby/lockfile"
# load configuration file
MRUBY_CONFIG = (ENV['MRUBY_CONFIG'] && ENV['MRUBY_CONFIG'] != '') ? ENV['MRUBY_CONFIG'] : "#{MRUBY_ROOT}/build_config.rb"
+2
View File
@@ -1,3 +1,5 @@
autoload :Pathname, 'pathname'
class Object
class << self
def attr_block(*syms)
+4
View File
@@ -1,7 +1,11 @@
require "mruby-core-ext"
require "mruby/build/load_gems"
require "mruby/build/command"
module MRuby
autoload :Gem, "mruby/gem"
autoload :Lockfile, "mruby/lockfile"
class << self
def targets
@targets ||= {}
+2 -3
View File
@@ -1,7 +1,6 @@
require 'pathname'
require 'forwardable'
require 'tsort'
require 'shellwords'
autoload :TSort, 'tsort'
autoload :Shellwords, 'shellwords'
module MRuby
module Gem