[Development] Platform / compiler support

João Abecasis joao.abecasis at nokia.com
Mon Nov 7 15:31:27 CET 2011


Hi,

Time and again there is some (not-so-recent) language or compiler feature (e.g. C99 variadic macros, TR1, <vector>, ...) that someone would like to use in Qt. We usually go it the safe way out: either the feature is used inside feature-specific #ifdefs or its use is ditched altogether and we work around the lack of it.

One unfortunate aspect of staying in the safe path is that to be able to make the most of a given feature the onus is on the developer to prove the Universe is ready for it. All would be better with a clearly defined Universe, which we're currently missing :-)

So, that brings us to the purpose of this thread. I'd like us to narrow the definition of said "Universe" by specifying the compilers we intend to support. The list of supported compilers ties in closely with the platforms so we'll keep them together in this discussion. Nailing these down should more easily allow us to decide whether it is feasible to use any given compiler or language feature in Qt.

To bootstrap the discussion I started a wiki page  with a short list of suggested supported compilers and platforms for Qt 5:

    http://wiki.qt-project.org/Supported_Platforms

At the bare minimum, I think we should strive to support these compilers:

    - GCC 4.2 and up
    - MSVC 2008 and later
    - Clang (trunk)

On the page above I also put in a list of platforms, splitting them between Desktop, Embedded and Mobile. The latter two categories only have a placeholder row, while for Desktop I put in the following platform-compiler mappings:

    - Linux: gcc 4.4 (Debian stable)
    - Microsoft Windows 7: MSVC 2008
    - Mac OS X Lion: gcc 4.2, clang 2.9

It'd be nice to have a list of reference platforms and even better if such platforms had maintainers who'd provide testing results, help fix issues and generally ensure the platforms are in a working state. Supporting a platform may also have implications on the release process. Anyway, all of that is a bigger discussion.

For the time being, I'm interested in the most basic level of support: ensuring the code compiles, keeping language and compiler feature #ifdef's at a maintainable (minimum) level, while still allowing developers to make the most of the language, compilers and standard libraries.

Comments?


João




More information about the Development mailing list