diff options
| author | ruki <[email protected]> | 2017-03-31 14:11:30 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-03-31 14:11:30 +0800 |
| commit | da740edbeca1c0beef66a147a21311a2f5adb734 (patch) | |
| tree | 1eee975ed6f42749015a3c7063d04a75f2b6fd4b /xmake/core/platform | |
| parent | 61ba954332d48aea024ec0585adec740df414094 (diff) | |
delay check toolchains
Diffstat (limited to 'xmake/core/platform')
| -rw-r--r-- | xmake/core/platform/platform.lua | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/xmake/core/platform/platform.lua b/xmake/core/platform/platform.lua index c8bf71346..e1c894add 100644 --- a/xmake/core/platform/platform.lua +++ b/xmake/core/platform/platform.lua @@ -242,10 +242,23 @@ end -- -- .e.g cc, cxx, mm, mxx, as, ar, ld, sh, .. -- -function platform.tool(kind) +function platform.tool(toolkind) - -- get it - return config.get(kind) + -- attempt to get it from config first + local toolpath = config.get(toolkind) + if toolpath ~= nil then + return toolpath + else + + -- check the tool path + local check = platform.get("check") + if check then + check("config", toolkind) + end + + -- get it again + return config.get(toolkind) + end end -- get the all platforms |
