From 3bf3f791be5d60fec2ac8e47cd0374ff2afe8ab8 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 12 Nov 2017 20:59:51 +0100 Subject: [PATCH] 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. --- modules/gmake2/gmake2_cpp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gmake2/gmake2_cpp.lua b/modules/gmake2/gmake2_cpp.lua index 76599ce9..2c10b415 100644 --- a/modules/gmake2/gmake2_cpp.lua +++ b/modules/gmake2/gmake2_cpp.lua @@ -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