Conversation
|
Break 了这些代码: on_config 里设置 runargs 没生效 |
|
暂时没空看,先 revert 了。。等回头有空嘞再说 #6676 |
Break these codes: Setting runargs in on_config does not take effect |
|
我看可以的么,按理应该不会影响到这个,仅仅只是改了并行顺序,只要 on_config 执行没有遗漏,就应该会生效 给个可复现的最小例子。 add_rules("mode.debug", "mode.release")
target("test")
set_kind("binary")
add_files("src/*.cpp")
on_config(function (target)
target:set("runargs", "--xxx=y")
end)run/main.lua local args = table.wrap(option.get("arguments") or target:get("runargs"))
print("args", args)
if not is_host("windows") and target:is_plat("windows") then
local wine = assert(find_tool("wine"), "wine not found!")
table.insert(args, 1, targetfile)
targetfile = wine.program
end
-- debugging?
if option.get("debug") then
debugger.run(targetfile, args, {curdir = rundir, addenvs = addenvs, setenvs = setenvs})
else
os.execv(targetfile, args, {curdir = rundir, detach = option.get("detach"), addenvs = addenvs, setenvs = setenvs})
end
ruki:test ruki$ xmake r
args {
"--xxx=y"
} |
再试试,应该可以了 |
|
先换成 这里是一个设置 |
Try again, it should be OK |
刚我已经修了,试下最新 patch 就行了 |
|
没问题了。 |
Merge pull request #6667 from xmake-io/config
No problem. |
#6659