summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/gcc.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-07-28 11:47:05 +0800
committerruki <[email protected]>2017-07-28 11:47:05 +0800
commit68a1ab8714d5243f85f09d53942ae4d2fdd78a47 (patch)
treedcb61a9cdd7f8775f1d5fb40f6bb65d717fc9dae /xmake/modules/core/tools/gcc.lua
parent222d8bbce334904d1a7cb3514d2655fe10b9fd35 (diff)
support pch for gcc
Diffstat (limited to 'xmake/modules/core/tools/gcc.lua')
-rw-r--r--xmake/modules/core/tools/gcc.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index 7b249cd66..4f53cc19c 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -252,7 +252,11 @@ end
-- make the precompiled header flag
function nf_precompiled_header(self, headerfile, target)
- return "-include " .. headerfile .. " -include-pch " .. target:pcheaderfile()
+ if self:name() == "clang" then
+ return "-include " .. headerfile .. " -include-pch " .. target:pcheaderfile()
+ else
+ return "-include " .. headerfile
+ end
end
-- make the link arguments list