summaryrefslogtreecommitdiff
path: root/xmake/modules/core
diff options
context:
space:
mode:
authorruki <[email protected]>2017-08-25 08:57:40 +0800
committerruki <[email protected]>2017-08-25 08:57:40 +0800
commit7acac1b09d7e01de075d7471f2e6240a281cd762 (patch)
treeb6db26acf247a8a599039b31bd3862161faa0407 /xmake/modules/core
parent75f4436e96f5ecd5c8e50d1e2613b58e1b674ee2 (diff)
fix pcxxheader bug for gcc
Diffstat (limited to 'xmake/modules/core')
-rw-r--r--xmake/modules/core/tools/gcc.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index 821cc77ce..39e1d3864 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -344,8 +344,10 @@ function _compargv1_pch(self, pcheaderfile, pcoutputfile, flags)
local pchflags = {}
local include = false
for _, flag in ipairs(flags) do
- if not include and not flag:find("-include", 1, true) then
- table.insert(pchflags, flag)
+ if not flag:find("-include", 1, true) then
+ if not include then
+ table.insert(pchflags, flag)
+ end
include = false
else
include = true