From f6f7fb2348d55ea195d4d24f750e32dde50e3bfd Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 26 Jun 2014 14:51:25 -0700 Subject: Disable the new multipass RCC when doing LTCG/LTO When LTCG/LTO is enabled, the link-time compilation will not use the data in the object file, but instead the precompiled data in a separate section, which is still blank and may not be recognizable by rcc's second pass. That would result in all resource data being nulls -- and the best case scenario out of that is that QResource concludes that there is no resource (it could be worse). That happens with GCC 4.8's GIMPLE intermediate format: a fat .o file containing GIMPLE would be modified by rcc but GCC would not use the modified data at the link stage, whereas a non-fat .o file would not be recognized at all by rcc and the compilation would abort. Change-Id: I78ccbfd77ceaa723f22a4f82b5b4d6536a80d65d Reviewed-by: hjk --- mkspecs/features/resources.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/resources.prf b/mkspecs/features/resources.prf index c1470e2dd8..fb51d433fb 100644 --- a/mkspecs/features/resources.prf +++ b/mkspecs/features/resources.prf @@ -11,7 +11,7 @@ rcc.name = RCC ${QMAKE_FILE_IN} rcc.depend_command = $$QMAKE_RCC_DEP -list $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN} rcc.CONFIG += add_inputs_as_makefile_deps -resources_small { +resources_small|ltcg { rcc.output = $$RCC_DIR/$${first(QMAKE_MOD_RCC)}_${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)} rcc.commands = $$QMAKE_RCC $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} -- cgit v1.2.3