summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-04-26 22:43:41 +0800
committerruki <[email protected]>2018-04-26 10:22:10 +0800
commit0ffc60c034373cf7f347eac69e5d6c67d4294d7e (patch)
tree9746f7a20205ad0d8f478a5d7f161d314112afa3
parentbbc6057f9602787119d3654c58b3d62ca54c9852 (diff)
improve include deps for gcc
-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()