cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl Aggressive Optimize for size

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 18 Sep 2012 09:22:15 +0200 (CEST)

On Mon, 17 Sep 2012, Emanuel Patern wrote:

> 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.

If you really want to shrink size you should probably consider switching to a
more minimalistic SSL library than OpenSSL. After that, you could opt to
disable a couple of protocols libcurl supports by default but that will be a
much smaller gain.

> But that doesn't seem that curl or openssl takes that optimization options
> in mind.

You can easily just verify which flags are used when the compile commands run.
A source code can't just ignore compiler optmization options at will.

> 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 ?

We have a section in docs/INSTALL discussing how Dan builds libcurl to a
~100KB lib on x86 that should be possbile to use as inspiration.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-09-18