[webkit-help] JSC: Compiling on iOS

Brian Barnes ggadwa at charter.net
Mon Jan 23 17:25:05 PST 2012


I've gotten this to work, without any trickery.  Not done yet as it produces a 190M library :) -- but it works and it has a single target.  The problem -- there's one code chance.

I'm hoping that the Apple guys here can see their way to including this target with the JSC Xcode project.

1) Duplicate the JavaScriptCore Target
2) Rename it JavaScriptCore-iOS (or anything)
3) Quit Xcode
4) Show Package contents on JavaScriptCore.xcodeproj
5) Edit project.pbxproj in a text editor; search for productType under JavaScriptCore-iOS and change value to com.apple.product-type.library.static
6) Go back to Xcode
7) In the Build Settings for the target:
     Change the SDK to iOS 5.0 (or something equivalent)
     Change the mach-o type to "static library"
     Remove the info-plist
     Removed Other Linker Flags
8) In Build Phases
     Remove all the libraries in "Link Binary with Libraries"
     Remove Derived Sources from Target Dependcies
     Duplicate "Generate Derived Sources" and "Generate DTrace Headers" from the derived sources target, put them after "Target Dependencies"
     Delete "check for global initializers"/"check for exit time destructors"/"check for weak vtables and externals"/"check for inapproriate obj-c class names"
9) In functional.h, change both occurences of:
       #if PLATFORM(MAC) && COMPILER_SUPPORTS(BLOCKS)
    to:
       #if PLATFORM(MAC) && COMPILER_SUPPORTS(BLOCKS) && !PLATFORM(IOS)

#9 is the big problem, I had to make a code change.  This might be something I don't understand about the code, but the header referenced is bad under a iOS compile.

Why its 190M right now, I don't know.  Maybe the DTrace stuff, I'll have to experiment.  Anybody that wants to tell me what it might be please do.

Here's the project file that was taken from the code updated yesterday; all comments appreciated.  Hopefully somebody will see fit to get this into the sources themselves, as there are lots of people that want to build this.

http://www.klinksoftware.com/download/JSC_Xcode.zip

Thanks for everybody's help, and anything to make this better is welcome!

[>] Brian


More information about the webkit-help mailing list