summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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