<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Moving webkit-dev to BCC since this is off-topic for the list.<div><br><div><div>On Jan 10, 2014, at 13:45, Eric Wing &lt;<a href="mailto:ewmailing@gmail.com">ewmailing@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">(I tried webkit-help but didn't get any responses, so I thought maybe<br>this list might be more appropriate for this question. Sorry for the<br>duplicate if otherwise.)<br><br>I am attempting to build JavaScriptCore for my own embedded<br>application use. I noticed that Mac and iOS JavaScriptCore have a<br>dependency on a library called libicucore.<br><br>When I build ICU myself from the , I get a handful of different icu<br>libraries, but nothing named "core".<br><br>While I can get a working JavaScriptCore built against my ICU<br>libraries (I need icuuc, icui18n, and icudata), my final binary size<br>is huge due to the ICU libraries I link in. I tried statically linking<br>my icu libraries, but the smallest my binary gets is about 30MB per<br>architecture. When I dynamically link ICU, I can tell that the major<br>contribution of the bloat is due to the ICU libraries.<br><br>Looking at Apple's icucore binary, it is about 6.5MB for 3<br>architectures which is tiny compared to my 3 icu libraries. I'm<br>speculating that Apple ripped out all the stuff they don't need and<br>merged in all the parts they do need into the single libicucore.<br><br>Can somebody confirm this is what Apple did, and can somebody tell me<br>how I can reproduce that? (I did try downloading Apple's 10.9 source<br>for ICU from MacOSForge, but it built the normal ICU stuff and not<br>libicucore, nor did I notice any special build options.)<br></blockquote><br></div><div>Disclaimer: I know very little about ICU, this is just what I found from spending a few minutes looking at their source.</div><br><div>If you look at the &lt;<a href="http://www.opensource.apple.com/source/ICU/ICU-511.25/">http://www.opensource.apple.com/source/ICU/ICU-511.25/</a>&gt; you can see the Makefile used when building ICU. It functions as a wrapper around ICU’s regular build process. I think the key option to shrink the library size is --with-data-packaging=archive. This puts the ICU data tables in a standalone file (/usr/share/icu/icudt51l.dat) rather than embedding them in the library. You'll also find the logic for packaging things up in to a library named libicucore.dylib here.</div><div><br></div><div>- Mark</div><div><br></div></div></body></html>