[libcalamares] Simplify symbol-visibility

Do not rely on Q_DECL_EXPORT and the like. Since we support basically
only gcc and clang for the kinds of Linux targets Calamares gets used
on, use visibility-specifiers that those compilers understand.
This commit is contained in:
Adriaan de Groot 2024-02-18 23:10:35 +01:00
parent d7bbfd055c
commit 4eba859236

View File

@ -11,7 +11,9 @@
#ifndef DLLMACRO_H
#define DLLMACRO_H
#include <qglobal.h>
#ifndef CALAMARES_EXPORT
#define CALAMARES_EXPORT __attribute__((visibility("default")))
#endif
/*
* Mark symbols exported from Calamares non-GUI library with DLLEXPORT.
@ -19,9 +21,9 @@
*/
#ifndef DLLEXPORT
#if defined( DLLEXPORT_PRO )
#define DLLEXPORT Q_DECL_EXPORT
#define DLLEXPORT CALAMARES_EXPORT
#else
#define DLLEXPORT Q_DECL_IMPORT
#define DLLEXPORT
#endif
#endif
@ -31,9 +33,9 @@
*/
#ifndef UIDLLEXPORT
#if defined( UIDLLEXPORT_PRO )
#define UIDLLEXPORT Q_DECL_EXPORT
#define UIDLLEXPORT CALAMARES_EXPORT
#else
#define UIDLLEXPORT Q_DECL_IMPORT
#define UIDLLEXPORT
#endif
#endif
@ -44,9 +46,9 @@
*/
#ifndef PLUGINDLLEXPORT
#if defined( PLUGINDLLEXPORT_PRO )
#define PLUGINDLLEXPORT Q_DECL_EXPORT
#define PLUGINDLLEXPORT CALAMARES_EXPORT
#else
#define PLUGINDLLEXPORT Q_DECL_IMPORT
#define PLUGINDLLEXPORT
#endif
#endif