diff options
| author | ruki <[email protected]> | 2022-05-22 14:59:17 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-05-22 14:59:17 +0800 |
| commit | 268371fc70abcb8a7d455923e5d937ceeaa6a04c (patch) | |
| tree | 61f75b493bc889f0f5ea6692f78e412082dbb5d2 /xmake/modules/private/utils/batchcmds.lua | |
| parent | 1ae7b87af15a19bbfb85f8c717ecef9fd72dc79e (diff) | |
fix batchcmds
Diffstat (limited to 'xmake/modules/private/utils/batchcmds.lua')
| -rw-r--r-- | xmake/modules/private/utils/batchcmds.lua | 4 |
1 files changed, 2 insertions, 2 deletions
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) |
