From 268371fc70abcb8a7d455923e5d937ceeaa6a04c Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 22 May 2022 14:59:17 +0800 Subject: fix batchcmds --- xmake/modules/private/utils/batchcmds.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xmake/modules/private/utils/batchcmds.lua') diff --git a/xmake/modules/private/utils/batchcmds.lua b/xmake/modules/private/utils/batchcmds.lua index 10b037f4e..a5a636f07 100644 --- a/xmake/modules/private/utils/batchcmds.lua +++ b/xmake/modules/private/utils/batchcmds.lua @@ -235,8 +235,8 @@ function batchcmds:compile(sourcefiles, objectfile, opt) -- load compiler and get compilation command local sourcekind = opt.sourcekind - if not sourcekind and type(sourcefiles) == "string" then - sourcekind = language.sourcekind_of(sourcefiles) + if not sourcekind and type(sourcefiles) == "string" or path.instance_of(sourcefiles) then + sourcekind = language.sourcekind_of(tostring(sourcefiles)) end local compiler_inst = compiler.load(sourcekind, opt) local program, argv = compiler_inst:compargv(sourcefiles, path(objectfile), opt) -- cgit v1.3.1