mirror of
https://github.com/curl/curl.git
synced 2026-07-29 16:12:21 +03:00
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:
parent
6246bbc656
commit
59582a9d9d
3 changed files with 56 additions and 5 deletions
|
|
@ -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
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue