summaryrefslogtreecommitdiff
path: root/xmake/core/tool/compiler.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2021-12-27 22:43:33 +0800
committerruki <[email protected]>2021-12-27 10:22:27 +0800
commit3ec0e76cda0df5be46d4df27c9e4513a3d63bf9e (patch)
tree476c0ef7d3adf392ae4d6afd028f7ab2541265fa /xmake/core/tool/compiler.lua
parent2166cd042494ecd3ffbad05a43aa336cb04ffd0e (diff)
improve error tips
Diffstat (limited to 'xmake/core/tool/compiler.lua')
-rw-r--r--xmake/core/tool/compiler.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmake/core/tool/compiler.lua b/xmake/core/tool/compiler.lua
index bddfea057..4c5b5f7cd 100644
--- a/xmake/core/tool/compiler.lua
+++ b/xmake/core/tool/compiler.lua
@@ -93,6 +93,7 @@ end
-- load compiler tool
function compiler._load_tool(sourcekind, target)
+ print(sourcekind, target:name())
-- get program from target
local program, toolname, toolchain_info
if target and target.tool then
@@ -111,6 +112,9 @@ end
-- load the compiler from the given source kind
function compiler.load(sourcekind, target)
+ if not sourcekind then
+ return nil, "unknown source kind!"
+ end
-- load compiler tool first (with cache)
local compiler_tool, program_or_errors = compiler._load_tool(sourcekind, target)