mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
Hide symbols with gcc.
With gcc >= 4 and ELF, set default visibility to hidden and make visible only the symbols with FLAC_API or FLACPP_API. A convenience libFLAC-static.la is created for test_libFLAC as it depends on the hidden symbols.
This commit is contained in:
committed by
Erik de Castro Lopo
parent
18e01547ac
commit
19c78e58d7
@@ -55,17 +55,22 @@
|
||||
* \{
|
||||
*/
|
||||
|
||||
#if defined(FLAC__NO_DLL) || !defined(_MSC_VER)
|
||||
#if defined(FLAC__NO_DLL)
|
||||
#define FLACPP_API
|
||||
|
||||
#else
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
#ifdef FLACPP_API_EXPORTS
|
||||
#define FLACPP_API _declspec(dllexport)
|
||||
#else
|
||||
#define FLACPP_API _declspec(dllimport)
|
||||
|
||||
#endif
|
||||
|
||||
#elif defined(FLAC__USE_VISIBILITY_ATTR)
|
||||
#define FLACPP_API __attribute__ ((visibility ("default")))
|
||||
|
||||
#else
|
||||
#define FLACPP_API
|
||||
|
||||
#endif
|
||||
|
||||
/* These #defines will mirror the libtool-based library version number, see
|
||||
|
||||
Reference in New Issue
Block a user