summaryrefslogtreecommitdiff
path: root/xmake/rules/c++/modules/modules_support/clang.lua
diff options
context:
space:
mode:
authorArthur LAURENT <[email protected]>2022-12-01 15:16:06 +0100
committerArthur LAURENT <[email protected]>2022-12-01 15:16:06 +0100
commite2c6eb2208f05cba0fe499656e2d8de1b70c9410 (patch)
treed14273205067b1604137688cc9cad13f5aab0aec /xmake/rules/c++/modules/modules_support/clang.lua
parent3758d42fbe0ed0b98a3022bcbf3217494275a6f3 (diff)
remove .i after reading it
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/clang.lua')
-rw-r--r--xmake/rules/c++/modules/modules_support/clang.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua
index 6ba2508d3..6f8b87303 100644
--- a/xmake/rules/c++/modules/modules_support/clang.lua
+++ b/xmake/rules/c++/modules/modules_support/clang.lua
@@ -224,7 +224,9 @@ function generate_dependencies(target, sourcebatch, opt)
end
local ifile = path.translate(path.join(outputdir, path.filename(file) .. ".i"))
os.vrunv(compinst:program(), table.join(defines, {"-E", "-x", "c++", file, "-o", ifile}))
- return io.readfile(ifile)
+ local content = io.readfile(ifile)
+ os.rm(ifile)
+ return content
end)
changed = true