diff options
| author | ruki <[email protected]> | 2025-09-05 12:15:58 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-09-05 12:15:58 +0800 |
| commit | 9f6d91af31ffc4bbbc0d04533786a0954afee2bf (patch) | |
| tree | f30814d17a5bd000fe4e1a2186b3301c99123f0a /xmake/plugins/project/utils/target_cmds.lua | |
| parent | 1738f7b9d1a336791216c6874c44d386f74cfda4 (diff) | |
| parent | ca139f4b270b402fb13652193057ca8dffe6fd4d (diff) | |
Merge pull request #6765 from xmake-io/thread
Improve bin2c to use native thread
Diffstat (limited to 'xmake/plugins/project/utils/target_cmds.lua')
| -rw-r--r-- | xmake/plugins/project/utils/target_cmds.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xmake/plugins/project/utils/target_cmds.lua b/xmake/plugins/project/utils/target_cmds.lua index ab1f8b42a..25413912a 100644 --- a/xmake/plugins/project/utils/target_cmds.lua +++ b/xmake/plugins/project/utils/target_cmds.lua @@ -79,6 +79,16 @@ function get_target_buildcmds(target, opt) end end end + -- translate batchcmds:lua to batchcmds:runv, we need to generate executable commmand + for _, cmd in ipairs(buildcmds:cmds()) do + local kind = cmd.kind + if cmd.script and (kind == "lua" or kind == "vlua") then + cmd.kind = (kind == "vlua") and "vrunv" or "runv" + cmd.program = os.programfile() + cmd.argv = table.join("lua", cmd.script, cmd.argv) + cmd.script = nil + end + end return buildcmds:cmds() end |
