phalcon/cphalcon — pull request #721 by sjinks (2013-06-25 08:20:11+00:00)
Title: Allow gcc to better optimize the code

This patch adds `-fvisibility=hidden` if it is supported (and gcc is 4.0 or better).
Quoting the gcc manual,

> Using this feature can very substantially improve linking and load times of shared object libraries, produce more optimized code, provide near-perfect API export and prevent symbol clashes. It is strongly recommended that you use this in any shared objects you distribute.

DSO sizes with and without -fvisibility=hidden (Ubuntu 13.04 amd64):
```
phalcon.so.default: 3,017,680 bytes
phalcon.so.hidden: 2,984,834 bytes
```

There is an option (commented out) to use Link Time Optimization — it is turned off because it *may* break something and therefore is not a recommended choice for the production system.