[webkit-help] JSC: Minimal win32 Build + Some Current Bugs

Adam Roben aroben at apple.com
Wed Jan 25 12:06:37 PST 2012


On Jan 25, 2012, at 2:37 PM, Brian Barnes wrote:

> On 1/25/2012 2:03 PM, Adam Roben wrote:
>> On Jan 25, 2012, at 1:44 PM, Brian Barnes wrote:
>> 
>>> I'm working on creating a minimal win32 build, without CFLite and pthreads (without the unicode is next to impossible.)
>>> 
>>> A non-CFLite build works fine, except for: api/JSStringRefCF.cpp
>>> 
>>> This code does not account for the USE(CF) flag.  I made this correction:
>>> 
>>> JSStringRef JSStringCreateWithCFString(CFStringRef string)
>>> {
>>> 	#if !USE(CF)
>>> 		return(NULL);
>>> 	#else
>>> 		// original code goes here!
>>> 	#endif
>>> }
>>> 
>>> CFStringRef JSStringCopyCFString(CFAllocatorRef alloc, JSStringRef string)
>>> {
>>> 	#if !USE(CF)
>>> 		return(NULL);
>>> 	#else
>>> 		// original code goes here!
>>> 	#endif
>>> }
>>> 
>>> This might not be the best solution, but if you compile without CF you can't expect these functions to be workable.
>> 
>> I'd just wrap this entire file in #if USE(CF)/#endif. There's no reason to compile these functions at all when not using CF.
> 
> You can't -- it won't link because those are external library functions.  You'd have to come up with something much more complex to fix it if you were to remove the entire functions.
> 
> Should I put up a bug report for this, too?

Yes, please. Please CC me on any bugs you file.

>>> One last one, just a reminder as I mentioned it before: keywords.table has two extra returns at the end which breaks parser.cpp.
>> 
>> Please file a bug about this at http://webkit.org/new-bug
> 
> Will do, tell me about the bug above and I'll put both in at once.

You've already described the bug (and at least part of its cause):

Symptom: You get a compiler about maxTokenLength when you try to build
Cause: Keywords.table has some extra blank lines in it

All you really need for a bug report is the symptom. But having the cause is great too!

> Would you guys/gals be willing to put up a "minimal" configuration in the JSC MSVC project?  Once these things are fixed, it's a simple change in platform.h to build without CF/CFLite (and the pthreads will be automatic.)  It's a one line change, so it's not that big of a deal, it's just nice to reduce the required DLL count by 2.  Basically:
> 
> #if PLATFORM(WIN) && !OS(WINCE)
> #define WTF_USE_CF 0                 <-- make this 0, obviously :)
> #define WTF_USE_PTHREADS 0
> #endif

Having a minimal configuration seems fine as long as it doesn't make it harder to maintain our other configurations. Unfortunately any configuration that is not tested on a buildbot on build.webkit.org is likely to get broken frequently, so having a buildbot for it would be great.

-Adam



More information about the webkit-help mailing list