qcompilerdetection: all supported compilers have visibility attributes

Remove a redundant QT_VISIBILITY_AVAILABLE check. Pointed out by Thiago
in review.

Note that this is going to help with breaking include cycles between
qglobal.h and qcompilerdetection.h (otherwise we'd have to include
qtconfiginclude.h in qcompilerdetection.h as the former includes
qconfig.h which defines QT_VISIBILITY_AVAILABLE; without
QT_VISIBILITY_AVAILABLE defined, Q_DECL_EXPORT/IMPORT expands to
nothing on Linux and co., and tools linking to qtcore (with bootstrap)
can't find exported methods.

Change-Id: Ib1244d43e606a6c80e122adea631305f6d8c51d3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Ahmad Samir 2023-02-13 20:34:11 +02:00
parent a0e3da2625
commit 2ad63a0975

View File

@ -175,7 +175,7 @@
# ifdef Q_OS_WIN # ifdef Q_OS_WIN
# define Q_DECL_EXPORT __declspec(dllexport) # define Q_DECL_EXPORT __declspec(dllexport)
# define Q_DECL_IMPORT __declspec(dllimport) # define Q_DECL_IMPORT __declspec(dllimport)
# elif defined(QT_VISIBILITY_AVAILABLE) # else
# define Q_DECL_EXPORT_OVERRIDABLE __attribute__((visibility("default"), weak)) # define Q_DECL_EXPORT_OVERRIDABLE __attribute__((visibility("default"), weak))
# ifdef QT_USE_PROTECTED_VISIBILITY # ifdef QT_USE_PROTECTED_VISIBILITY
# define Q_DECL_EXPORT __attribute__((visibility("protected"))) # define Q_DECL_EXPORT __attribute__((visibility("protected")))