diff options
| author | ruki <[email protected]> | 2020-05-20 23:17:55 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-05-20 13:47:33 +0800 |
| commit | addd29396de0952b78cc69c4510b7be0f7886c1f (patch) | |
| tree | bf6ae81193a92ac1c2082183eb8a19fab05e9a2f /xmake/core/tool/toolchain.lua | |
| parent | eff77a9a787016605baf133bc1a582ef8437a7fa (diff) | |
improve envs
Diffstat (limited to 'xmake/core/tool/toolchain.lua')
| -rw-r--r-- | xmake/core/tool/toolchain.lua | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/xmake/core/tool/toolchain.lua b/xmake/core/tool/toolchain.lua index f5d6ada4f..97fb512a1 100644 --- a/xmake/core/tool/toolchain.lua +++ b/xmake/core/tool/toolchain.lua @@ -68,10 +68,8 @@ function _instance:get(name) return value end - -- lazy loading platform if get other configuration - if not self:_is_builtin_conf(name) then - self:_load() - end + -- lazy loading platform + self:_load() -- get other platform info return self._INFO:get(name) @@ -233,23 +231,6 @@ function _instance:_checktool(toolkind, toolpath) return program, toolname end --- is builtin configuration? -function _instance:_is_builtin_conf(name) - - local builtin_configs = self._BUILTIN_CONFIGS - if not builtin_configs then - builtin_configs = {} - for apiname, _ in pairs(toolchain._interpreter():apis("toolchain")) do - local pos = apiname:find('_', 1, true) - if pos then - builtin_configs[apiname:sub(pos + 1)] = true - end - end - self._BUILTIN_CONFIGS = builtin_configs - end - return builtin_configs[name] -end - -- the interpreter function toolchain._interpreter() @@ -289,6 +270,8 @@ function toolchain._apis() { -- toolchain.set_xxx "toolchain.set_toolsets" + -- toolchain.add_xxx + , "toolchain.add_runenvs" } , script = { |
