From 0ffc60c034373cf7f347eac69e5d6c67d4294d7e Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 26 Apr 2018 22:43:41 +0800 Subject: improve include deps for gcc --- xmake/modules/core/tools/gcc.lua | 8 ++++++++ 1 file changed, 8 insertions(+) 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() -- cgit v1.3.1