Implemented --enable-hidden-symbols configure option to enable

-fvisibility=hidden on gcc >= 4.0.  This reduces the size of the libcurl
binary and speeds up dynamic linking by hiding all the internal symbols from
the symbol table.
This commit is contained in:
Dan Fandrich 2006-06-12 20:33:04 +00:00
parent 6246bbc656
commit 59582a9d9d
3 changed files with 56 additions and 5 deletions

View file

@ -58,7 +58,17 @@ extern "C" {
#define CURL_EXTERN __declspec(dllimport)
#endif
#else
#define CURL_EXTERN
#ifdef CURL_HIDDEN_SYMBOLS
/*
* On gcc >= 4 if -fvisibility=hidden is given then this is used to cause
* external definitions to be put into the shared library. It makes no
* difference to applications whether this is set or not, only the library.
*/
#define CURL_EXTERN __attribute__ ((visibility ("default")))
#else
#define CURL_EXTERN
#endif
#endif
/*