summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/core/tools/gcc.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index 963517af0..a79c122c4 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -322,6 +322,14 @@ end
-- get include deps
function _include_deps(self, sourcefile, flags)
+ -- support -E -MM? some old gcc does not support it at same time
+ if _g._HAS_EMM == nil then
+ _g._HAS_EMM = self:has_flags("-E -MM")
+ end
+ if not _g._HAS_EMM then
+ return {}
+ end
+
-- the temporary file
local tmpfile = os.tmpfile()