diff options
author | Tor Arne Vestbø <tor.arne.vestbo@nokia.com> | 2010-09-19 09:40:32 (GMT) |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@nokia.com> | 2010-10-15 12:10:10 (GMT) |
commit | 3cba3745ac2f2cf616d341f2982c22e9809e1725 (patch) | |
tree | cf536c77f7deb0e72cf62ed13b6d963773f25b09 /src | |
parent | efa0b410703898cb78d48d62ef7d389be2e87a33 (diff) | |
download | Qt-3cba3745ac2f2cf616d341f2982c22e9809e1725.zip Qt-3cba3745ac2f2cf616d341f2982c22e9809e1725.tar.gz Qt-3cba3745ac2f2cf616d341f2982c22e9809e1725.tar.bz2 |
Phonon: Export ObjectDescriptionModel to prevent link errors with Clang
Workaround for http://llvm.org/bugs/show_bug.cgi?id=8177
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/phonon/phonon/objectdescriptionmodel.h | 3 | ||||
-rw-r--r-- | src/corelib/global/qglobal.h | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/3rdparty/phonon/phonon/objectdescriptionmodel.h b/src/3rdparty/phonon/phonon/objectdescriptionmodel.h index 8fd622f..d994600 100644 --- a/src/3rdparty/phonon/phonon/objectdescriptionmodel.h +++ b/src/3rdparty/phonon/phonon/objectdescriptionmodel.h @@ -141,10 +141,11 @@ namespace Phonon /* Required to ensure template class vtables are exported on both symbian and existing builds. */ -#if defined(Q_OS_SYMBIAN) && defined(Q_CC_RVCT) +#if (defined(Q_OS_SYMBIAN) && defined(Q_CC_RVCT)) || defined(Q_CC_CLANG) // RVCT compiler (2.2.686) requires the export declaration to be on the class to export vtables // MWC compiler works both ways // GCCE compiler is unknown (it can't compile QtCore yet) +// Clang also requires the export declaration to be on the class to export vtables #define PHONON_TEMPLATE_CLASS_EXPORT PHONON_EXPORT #define PHONON_TEMPLATE_CLASS_MEMBER_EXPORT #else diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 1b2a6a8..b983132 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -356,6 +356,7 @@ namespace QT_NAMESPACE {} GCCE - GCCE (Symbian GCCE builds) RVCT - ARM Realview Compiler Suite NOKIAX86 - Nokia x86 (Symbian WINSCW builds) + CLANG - C++ front-end for the LLVM compiler Should be sorted most to least authoritative. @@ -452,6 +453,10 @@ namespace QT_NAMESPACE {} # define Q_CC_INTEL # define Q_NO_TEMPLATE_FRIENDS # endif +# if defined(__clang__) +/* Clang also masquerades as GCC 4.2.1 */ +# define Q_CC_CLANG +# endif # ifdef __APPLE__ # define Q_NO_DEPRECATED_CONSTRUCTORS # endif |