diff --git a/src/libs/clangsupport/clangpathwatcher.h b/src/libs/clangsupport/clangpathwatcher.h index 610e42cccf2..9339c56d51d 100644 --- a/src/libs/clangsupport/clangpathwatcher.h +++ b/src/libs/clangsupport/clangpathwatcher.h @@ -77,7 +77,7 @@ using IdCache = StringCache -class CLANGSUPPORT_EXPORT ClangPathWatcher : public ClangPathWatcherInterface +class CLANGSUPPORT_GCCEXPORT ClangPathWatcher : public ClangPathWatcherInterface { public: ClangPathWatcher(FilePathCachingInterface &pathCache, diff --git a/src/libs/clangsupport/clangsupport_global.h b/src/libs/clangsupport/clangsupport_global.h index 34f65cdcad0..67830143f6c 100644 --- a/src/libs/clangsupport/clangsupport_global.h +++ b/src/libs/clangsupport/clangsupport_global.h @@ -39,6 +39,12 @@ # define CLANGSUPPORT_EXPORT Q_DECL_IMPORT #endif +#ifdef Q_CC_GNU +# define CLANGSUPPORT_GCCEXPORT __attribute__((visibility("default"))) +#else +# define CLANGSUPPORT_GCCEXPORT +#endif + #ifndef CLANGBACKENDPROCESSPATH # define CLANGBACKENDPROCESSPATH "" #endif diff --git a/src/libs/clangsupport/filepathcache.h b/src/libs/clangsupport/filepathcache.h index 81bc3f40cc8..ebdd2a8aacb 100644 --- a/src/libs/clangsupport/filepathcache.h +++ b/src/libs/clangsupport/filepathcache.h @@ -36,7 +36,7 @@ namespace ClangBackEnd { template -class CLANGSUPPORT_EXPORT FilePathCache +class CLANGSUPPORT_GCCEXPORT FilePathCache { using DirectoryPathCache = StringCache