diff options
| author | ruki <[email protected]> | 2024-12-20 22:46:05 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-12-20 22:46:05 +0800 |
| commit | 2e4a9d342f531b865d1029c03d74b98a2f755661 (patch) | |
| tree | d1bd087c4a58244216bfa087b4b1af37b2090b3f | |
| parent | 1b6a5d25595c45c6e9515932975cc795ac3c8e6a (diff) | |
fix depfile for tcc
| -rw-r--r-- | xmake/modules/core/tools/tcc.lua | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/xmake/modules/core/tools/tcc.lua b/xmake/modules/core/tools/tcc.lua index 98d81a998..8251f9f64 100644 --- a/xmake/modules/core/tools/tcc.lua +++ b/xmake/modules/core/tools/tcc.lua @@ -152,14 +152,9 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt) { function () - -- support `-MMD -MF depfile.d`? some old gcc does not support it at same time - if depfile and _g._HAS_MMD_MF == nil then - _g._HAS_MMD_MF = self:has_flags({"-MD", "-MF", os.nuldev()}, "cflags", { flagskey = "-MD -MF" }) or false - end - -- generate includes file local compflags = flags - if depfile and _g._HAS_MMD_MF then + if depfile then compflags = table.join(compflags, "-MD", "-MF", depfile) end |
