diff options
author | Jędrzej Nowacki <jedrzej.nowacki@digia.com> | 2014-03-05 17:32:24 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-06 17:22:55 +0100 |
commit | 9a08483d763dacfca6029f7a8970846e83df0e2a (patch) | |
tree | 460b806bf44e21097e5ea3464f68458c3f235bce /tests | |
parent | 275dcd61d30a59a6144c5ba40ae853cca463b173 (diff) |
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>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/kernel/kernel.pro | 4 | ||||
-rw-r--r-- | tests/auto/corelib/kernel/qmetatype/qmetatype.pro | 15 |
2 files changed, 15 insertions, 4 deletions
diff --git a/tests/auto/corelib/kernel/kernel.pro b/tests/auto/corelib/kernel/kernel.pro index 3ec783ab2c..604a0f4fd8 100644 --- a/tests/auto/corelib/kernel/kernel.pro +++ b/tests/auto/corelib/kernel/kernel.pro @@ -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 diff --git a/tests/auto/corelib/kernel/qmetatype/qmetatype.pro b/tests/auto/corelib/kernel/qmetatype/qmetatype.pro index d19ec23760..fc262b8fc7 100644 --- a/tests/auto/corelib/kernel/qmetatype/qmetatype.pro +++ b/tests/auto/corelib/kernel/qmetatype/qmetatype.pro @@ -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 +} |