diff options
| author | ruki <[email protected]> | 2016-05-24 20:54:11 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-05-24 20:54:11 +0800 |
| commit | c5606b9bc54e3630898554f61fc191073506591b (patch) | |
| tree | 0a0bc9d4c1807d2282ea61489d3c999d7513a178 /xmake/core/tool/tool.lua | |
| parent | 487eda865797da4fc81ba8ba8ec932dc2fb64cec (diff) | |
modify merge static library test
Diffstat (limited to 'xmake/core/tool/tool.lua')
| -rw-r--r-- | xmake/core/tool/tool.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/xmake/core/tool/tool.lua b/xmake/core/tool/tool.lua index 3846dc499..d16d27a7b 100644 --- a/xmake/core/tool/tool.lua +++ b/xmake/core/tool/tool.lua @@ -124,10 +124,13 @@ end -- load the given tool from the given shell name function tool._load(shellname, kind) + -- calculate the cache key + local key = shellname .. (kind or "") + -- get it directly from cache dirst tool._TOOLS = tool._TOOLS or {} - if tool._TOOLS[shellname] then - return tool._TOOLS[shellname] + if tool._TOOLS[key] then + return tool._TOOLS[key] end -- find the tool script path @@ -170,7 +173,7 @@ function tool._load(shellname, kind) end -- save tool to the cache - tool._TOOLS[shellname] = module + tool._TOOLS[key] = module -- ok? return module |
