summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools
diff options
context:
space:
mode:
authorruki <[email protected]>2025-01-24 23:03:27 +0800
committerruki <[email protected]>2025-01-24 23:03:27 +0800
commit8be99bc6983b35ef18ed2147487fd28118bd34d7 (patch)
tree4d0640a38ae140ee4d18320168de7d621a9e419c /xmake/modules/core/tools
parent1b1ed22d618e6c31ede1cf2f1168476b504f5deb (diff)
improve to parser deps
Diffstat (limited to 'xmake/modules/core/tools')
-rw-r--r--xmake/modules/core/tools/armcc.lua3
-rw-r--r--xmake/modules/core/tools/cl.lua6
-rw-r--r--xmake/modules/core/tools/cl6x.lua3
-rw-r--r--xmake/modules/core/tools/clang_cl.lua3
-rw-r--r--xmake/modules/core/tools/dmd.lua3
-rw-r--r--xmake/modules/core/tools/gcc.lua3
-rw-r--r--xmake/modules/core/tools/nvcc.lua3
-rw-r--r--xmake/modules/core/tools/rc.lua3
-rw-r--r--xmake/modules/core/tools/sdcc.lua3
-rw-r--r--xmake/modules/core/tools/tcc.lua3
10 files changed, 22 insertions, 11 deletions
diff --git a/xmake/modules/core/tools/armcc.lua b/xmake/modules/core/tools/armcc.lua
index 85aeda98c..3642feceb 100644
--- a/xmake/modules/core/tools/armcc.lua
+++ b/xmake/modules/core/tools/armcc.lua
@@ -186,7 +186,8 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
-- generate the dependent includes
if depfile and os.isfile(depfile) then
if dependinfo then
- dependinfo.depfiles_armcc = io.readfile(depfile, {continuation = "\\"})
+ dependinfo.depfiles_format = "armcc"
+ dependinfo.depfiles = io.readfile(depfile, {continuation = "\\"})
end
-- remove the temporary dependent file
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua
index dab766482..8a2971328 100644
--- a/xmake/modules/core/tools/cl.lua
+++ b/xmake/modules/core/tools/cl.lua
@@ -778,10 +778,12 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
-- generate the dependent includes
if dependinfo then
if depfile and os.isfile(depfile) then
- dependinfo.depfiles_cl_json = io.readfile(depfile)
+ dependinfo.depfiles_format = "cl_json"
+ dependinfo.depfiles = io.readfile(depfile)
os.tryrm(depfile)
elseif outdata then
- dependinfo.depfiles_cl = outdata
+ dependinfo.depfiles_format = "cl"
+ dependinfo.depfiles = outdata
end
end
end
diff --git a/xmake/modules/core/tools/cl6x.lua b/xmake/modules/core/tools/cl6x.lua
index 334df4798..f350808da 100644
--- a/xmake/modules/core/tools/cl6x.lua
+++ b/xmake/modules/core/tools/cl6x.lua
@@ -192,7 +192,8 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
-- generate the dependent includes
if depfile and os.isfile(depfile) then
if dependinfo then
- dependinfo.depfiles_cl6x = io.readfile(depfile, {continuation = "\\"})
+ dependinfo.depfiles_format = "cl6x"
+ dependinfo.depfiles = io.readfile(depfile, {continuation = "\\"})
end
-- remove the temporary dependent file
diff --git a/xmake/modules/core/tools/clang_cl.lua b/xmake/modules/core/tools/clang_cl.lua
index 694a05fcd..175bcff2a 100644
--- a/xmake/modules/core/tools/clang_cl.lua
+++ b/xmake/modules/core/tools/clang_cl.lua
@@ -216,6 +216,7 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
-- generate the dependent includes
if dependinfo and outdata then
- dependinfo.depfiles_cl = outdata
+ dependinfo.depfiles_format = "cl"
+ dependinfo.depfiles = outdata
end
end
diff --git a/xmake/modules/core/tools/dmd.lua b/xmake/modules/core/tools/dmd.lua
index 4a14acfac..47378c570 100644
--- a/xmake/modules/core/tools/dmd.lua
+++ b/xmake/modules/core/tools/dmd.lua
@@ -267,7 +267,8 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
if depfile and os.isfile(depfile) then
if dependinfo then
-- it use makefile/gcc compatiable format
- dependinfo.depfiles_gcc = io.readfile(depfile, {continuation = "\\"})
+ dependinfo.depfiles_format = "gcc"
+ dependinfo.depfiles = io.readfile(depfile, {continuation = "\\"})
end
-- remove the temporary dependent file
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index 10ac810f3..4ca8a717c 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -987,7 +987,8 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
-- generate the dependent includes
if depfile and os.isfile(depfile) then
if dependinfo then
- dependinfo.depfiles_gcc = io.readfile(depfile, {continuation = "\\"})
+ dependinfo.depfiles_format = "gcc"
+ dependinfo.depfiles = io.readfile(depfile, {continuation = "\\"})
end
-- remove the temporary dependent file
diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua
index fdb305631..ea8c8704a 100644
--- a/xmake/modules/core/tools/nvcc.lua
+++ b/xmake/modules/core/tools/nvcc.lua
@@ -436,7 +436,8 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
if depfile and os.isfile(depfile) then
if dependinfo then
-- nvcc uses gcc-style depfiles
- dependinfo.depfiles_gcc = io.readfile(depfile, {continuation = "\\"})
+ dependinfo.depfiles_format = "gcc"
+ dependinfo.depfiles = io.readfile(depfile, {continuation = "\\"})
end
-- remove the temporary dependent file
diff --git a/xmake/modules/core/tools/rc.lua b/xmake/modules/core/tools/rc.lua
index 930fa4942..91c1984ca 100644
--- a/xmake/modules/core/tools/rc.lua
+++ b/xmake/modules/core/tools/rc.lua
@@ -157,7 +157,8 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
end
file:close()
if dependinfo then
- dependinfo.depfiles_rc = depfiles_rc
+ dependinfo.depfiles_format = "rc"
+ dependinfo.depfiles = depfiles_rc
end
end
os.tryrm(outfile)
diff --git a/xmake/modules/core/tools/sdcc.lua b/xmake/modules/core/tools/sdcc.lua
index 6cbec5d43..ed2d55737 100644
--- a/xmake/modules/core/tools/sdcc.lua
+++ b/xmake/modules/core/tools/sdcc.lua
@@ -243,7 +243,8 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
-- generate the dependent includes
if depfile and os.isfile(depfile) then
if dependinfo then
- dependinfo.depfiles_gcc = io.readfile(depfile, {continuation = "\\"})
+ dependinfo.depfiles_format = "gcc"
+ dependinfo.depfiles = io.readfile(depfile, {continuation = "\\"})
end
-- remove the temporary dependent file
diff --git a/xmake/modules/core/tools/tcc.lua b/xmake/modules/core/tools/tcc.lua
index 8251f9f64..cb97d4c05 100644
--- a/xmake/modules/core/tools/tcc.lua
+++ b/xmake/modules/core/tools/tcc.lua
@@ -201,7 +201,8 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt)
-- generate the dependent includes
if depfile and os.isfile(depfile) then
if dependinfo then
- dependinfo.depfiles_gcc = io.readfile(depfile, {continuation = "\\"})
+ dependinfo.depfiles_format = "gcc"
+ dependinfo.depfiles = io.readfile(depfile, {continuation = "\\"})
end
-- remove the temporary dependent file