Try to speedup tst_qmetatype.cpp compilation with clang.

The test instantiates enormous amounts of templates in one compilation
unit. All clang versions, that I tested, suffers from performance issues
while compiling the test, the cost depends on the version. The most
affected are shipped by Apple.

Task-number: QTBUG-37237

Change-Id: I0959c1a4a6faee448ae1dae5c1e70ee06cefbd9c
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
bb10
Jędrzej Nowacki 2014-03-05 17:32:24 +01:00 committed by The Qt Project
parent 275dcd61d3
commit 9a08483d76
2 changed files with 15 additions and 4 deletions

View File

@ -21,10 +21,6 @@ SUBDIRS=\
qvariant \
qwineventnotifier
# Building the qmetatype test with Clang on ARM takes forever (QTBUG-37237)
!clang|!contains(QT_ARCH, arm): \
SUBDIRS += qmetatype
!qtHaveModule(gui): SUBDIRS -= \
qmimedata

View File

@ -15,3 +15,18 @@ win32-msvc*|wince|winrt {
QMAKE_CFLAGS_RELEASE -= -O2
}
}
clang {
# clang has some performance problems with the test. Especially
# with automaticTemplateRegistration which creates few thousands
# template instantiations (QTBUG-37237). Removing -O2 and -g
# improves the situation, but it is not solving the problem.
QMAKE_CXXFLAGS_RELEASE -= -O2
QMAKE_CFLAGS_RELEASE -= -O2
QMAKE_CXXFLAGS_RELEASE -= -g
QMAKE_CFLAGS_RELEASE -= -g
# Building for ARM (eg iOS) is affected so much that we disable
#the template part of the test
contains(QT_ARCH, arm): DEFINES += TST_QMETATYPE_BROKEN_COMPILER
}