From 0f35ac078db3f9e7bd8d074d8459f8cae328b921 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Fri, 30 Aug 2013 23:16:58 +0300 Subject: [PATCH] Made PCH work with cross compilation. --- backends.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backends.py b/backends.py index b0d3dadab..341d2fb8d 100644 --- a/backends.py +++ b/backends.py @@ -736,6 +736,9 @@ class NinjaBackend(Backend): return (commands, dep, dst) def generate_pch(self, target, outfile): + cstr = '' + if target.is_cross: + cstr = '_CROSS' for lang in ['c', 'cpp']: pch = target.get_pch(lang) if len(pch) == 0: @@ -751,7 +754,7 @@ class NinjaBackend(Backend): src = os.path.join(self.build_to_src, target.get_source_subdir(), pch[0]) (commands, dep, dst) = self.generate_gcc_pch_command(target, compiler, pch[0]) extradep = None - rulename = compiler.get_language() + '_PCH' + rulename = compiler.get_language() + cstr + '_PCH' elem = NinjaBuildElement(dst, rulename, src) if extradep is not None: elem.add_dep(extradep)