Skip to content

Commit

Permalink
Merge pull request #5920 from UE4SS/fix-source-dependencies-msvc-wine
Browse files Browse the repository at this point in the history
Fix /sourceDependencies <path> not on one line when using msvc-wine
  • Loading branch information
waruqi authored Dec 3, 2024
2 parents fcabe58 + 0c583d8 commit b3c3116
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion xmake/core/base/winos.lua
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,11 @@ function winos.cmdargv(argv, opt)
-- -Dxxx
-- foo.obj
--
if idx + 1 <= #argv and arg:find("^[-/]") and not arg1:find("^[-/]") then

-- if host is not Windows, paths may start with '/', which conflicts with '/<argname>'
-- note that checking if the next argument ends with '.json' will only work for /sourceDependencies
-- other arguments will remain broken, perhaps we should discuss a better solution
if idx + 1 <= #argv and arg:find("^[-/]") and (os.is_host("windows") and (not arg1:find("^[-/]")) or (arg1:endswith(".json"))) then
f:write(os.args(arg, {escape = opt.escape}) .. " ")
f:write(os.args(arg1, {escape = opt.escape}) .. "\n")
idx = idx + 2
Expand Down

0 comments on commit b3c3116

Please sign in to comment.