Fixed a bug in gmake2 with clang and pch.

Clang requires the pch file to be the first force-included item. This fix doesn't break pch usage in gcc.
This commit is contained in:
Unknown 2017-11-12 20:59:51 +01:00
parent 96a020c532
commit 3bf3f791be

View File

@ -405,7 +405,7 @@
function cpp.forceInclude(cfg, toolset)
local includes = toolset.getforceincludes(cfg)
if not cfg.flags.NoPCH and cfg.pchheader then
table.insert(includes, "-include $(PCH_PLACEHOLDER)")
table.insert(includes, 1, "-include $(PCH_PLACEHOLDER)")
end
p.outln('FORCE_INCLUDE +=' .. gmake2.list(includes))
end