summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-12-16 00:34:40 +0800
committerruki <[email protected]>2025-12-16 00:34:40 +0800
commitbbea1373c5cfe37a6a6670be9ea9ba37f366e617 (patch)
treee1dd34d21dc714e4106373a37bfd77a8266aca6e
parent757ad890028fddcdea24159634d83bbfc41073ef (diff)
improve depfiles
-rw-r--r--xmake/modules/core/tools/clang_cl.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/xmake/modules/core/tools/clang_cl.lua b/xmake/modules/core/tools/clang_cl.lua
index fb3333530..35c58edf3 100644
--- a/xmake/modules/core/tools/clang_cl.lua
+++ b/xmake/modules/core/tools/clang_cl.lua
@@ -243,10 +243,12 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
-- generate the dependent includes
if dependinfo and outdata then
- if depfile and os.isfile(depfile) then
- dependinfo.depfiles_format = depfile_format
- dependinfo.depfiles = io.readfile(depfile)
- os.tryrm(depfile)
+ if depfile then
+ if os.isfile(depfile) then
+ dependinfo.depfiles_format = depfile_format
+ dependinfo.depfiles = io.readfile(depfile)
+ os.tryrm(depfile)
+ end
elseif depfile_format == "cl" then
dependinfo.depfiles_format = "cl"
dependinfo.depfiles = outdata