curl-library
Curl Aggressive Optimize for size
Date: Mon, 17 Sep 2012 19:02:48 -0700 (PDT)
Hi;
I have built libcurl with openssl all in static mode. In My C++ project, I added the required libcurl.a, libssl.a and libcrypto.a to my project and creates a symple curl session for testing.
My project requires also the following static libs that I have linked with :
* libgdi32.a
* libws2_32.a
After compile, the executable size jump from 8KB into 2.16 MB !!
This is a huge size, especially and what surprise me is that I have added optimization options to minimize for size :
-fno-rtti
-fno-exceptions
-ffunction-sections
-fdata-sections
-Os
But that doesn't seem that curl or openssl takes that optimization options in mind. I am not sure but did I miss to compile either curl or openssl with optimization options, if in case how to rebuild either curl or openssl with size optimization enabled ?
Regards
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-09-18