Currently, Premake builds shared libraries on Mac with -flat_namespace. What was the reason to do so?
I've discovered this fact due to -flat_namespace breaks Qt plugin loading. I've read man ld and concluded this option is not really helpful because it degrades start-up performance.
Should be there a flag to disable (or enable, if removed by default) -flat_namespace?

After a quick Google search, I think I agree with you. Folks who do need it can add it back easily enough as a build option. Can you file a patch or bug report for it?
It's here: https://sourceforge.net/tracker/?group_id=71616&atid=531880
Here is an explanation of flat_namespace mess: http://lists.macosforge.org/pipermail/macports-dev/2008-October/006266.html
flat_namespace not only provides compatibility for previous Darwin versions yet also provides compatibility to how Unix ld works.
Can it affect well-written code?