From 3ec0e76cda0df5be46d4df27c9e4513a3d63bf9e Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 27 Dec 2021 22:43:33 +0800 Subject: improve error tips --- xmake/core/tool/compiler.lua | 4 ++++ 1 file changed, 4 insertions(+) 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) -- cgit v1.3.1