[webkit-dev] How to reduce the size of my dll

Adam Roben aroben at apple.com
Tue Feb 10 21:30:13 PST 2009


On Feb 10, 2009, at 8:05 PM, cui.yuan2 at zte.com.cn wrote:

>
> Thank you for your reply ,and alse Darren VanBuren. I have no right  
> to sent mails to any addresses except webkit-dev at lists.webkit.org In  
> office. So... I'm sorry
>
> I'm sure I did a release build. All the files,including  
> JavascriptCore and webcore  are added to my project. I even do the  
> optimization as much as possible.So I think I should do some  
> compiler and linker settings(but not sure).
>
> ps:I have checked the PE header, and the .rdata section accounts for  
> 95%.
>
> My compiler and Linker command line is as follows:
>
> compiler:
> /Od /I /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D  
> "WEBKIT_EXPORTS" /D "_WINDLL" /D "_AFXDLL" /D "_ATL_DLL" /D  
> "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MDd /Zc:wchar_t- /Fo"Debug\ 
> \" /Fd"Debug\vc80.pdb" /W0 /nologo /c /Wp64 /ZI /TP / 
> errorReport:prompt
>
> linker
> /OUT:"Debug\WebKit.dll" /INCREMENTAL /NOLOGO /LIBPATH:"../NetStack/ 
> Debug" /DLL /MANIFEST /MANIFESTFILE:"Debug 
> \WebKit.dll.intermediate.manifest" /NODEFAULTLIB:"msvcrtd.lib" / 
> NODEFAULTLIB:"mfcs80ud.lib" /DEBUG /PDB:"e:\WebBrowser\WebKit\Debug 
> \WebKit.pdb" /SUBSYSTEM:WINDOWS /MACHINE:X86 /ERRORREPORT:PROMPT  
> mfcs80ud.lib msvcrtd.lib NetStack.lib

This certainly looks like a debug build to me. Notice all the  
instances of "Debug" in both of your command lines. The "/Od" switch  
being passed to the compiler disables all optimizations.

WebKit.sln has a Release configuration. You need to make sure you're  
building that. "build-webkit --release" should do it.

-Adam

> On Feb 10, 2009, at 12:05 AM, cui.yuan2 at zte.com.cn wrote:
>
>
> Hi all:
>
> Currently I'm trying to build webkit in my own VS2005 project.  
> (Makeing a new project ,then adding the source file to it and doing   
> some necessary changes) The size of webkit.dll I got is 107m,and  
> seems too large. I observe the same dll in safari for windows is  
> less than 5m. So, I want to know how I can reduce the size of my dll  
> file, need some settings or change the platform?
>
> Perhaps you did a Debug build? Release build DLLs should be smaller  
> than Debug build DLLs.
>
> -Adam
>
>
> --------------------------------------------------------
> ZTE Information Security Notice: The information contained in this  
> mail is solely property of the sender's organization. This mail  
> communication is confidential. Recipients named above are obligated  
> to maintain secrecy and are not permitted to disclose the contents  
> of this communication to others.
> This email and any files transmitted with it are confidential and  
> intended solely for the use of the individual or entity to whom they  
> are addressed. If you have received this email in error please  
> notify the originator of the message. Any views expressed in this  
> message are those of the individual sender.
> This message has been scanned for viruses and Spam by ZTE Anti-Spam  
> system.
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090211/16fc0e85/attachment.html>


More information about the webkit-dev mailing list