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.
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
