Skip to content

Commit

Permalink
Merge pull request #4897 from xmake-io/rc
Browse files Browse the repository at this point in the history
improve rc deps #4893
  • Loading branch information
waruqi committed Mar 29, 2024
2 parents b5fbc28 + e93186c commit 6a6c19b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion xmake/modules/core/tools/rc.lua
Expand Up @@ -128,7 +128,13 @@ function compile(self, sourcefile, objectfile, dependinfo, flags)
if cl then
local outfile = os.tmpfile() .. ".rc.out"
local errfile = os.tmpfile() .. ".rc.err"
local ok = try {function () os.execv(cl, {"-E", sourcefile}, {stdout = outfile, stderr = errfile, envs = self:runenvs()}); return true end}
local includeflags = {}
for _, flag in ipairs(flags) do
if flag:match("^[-/]I") then
table.insert(includeflags, flag)
end
end
local ok = try {function () os.execv(cl, table.join("-E", includeflags, sourcefile), {stdout = outfile, stderr = errfile, envs = self:runenvs()}); return true end}
if ok and os.isfile(outfile) then
local depfiles_rc
local includeset = hashset.new()
Expand Down

0 comments on commit 6a6c19b

Please sign in to comment.