Skip to content

Commit 2a4c0ef

Browse files
committed
My notes on how to update this thing
1 parent d36612a commit 2a4c0ef

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

UPDATING.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
Steps taken to create JavaScriptCore static iOS library from webkit sources:
2+
---
3+
4+
- Remove JavaScriptCore and WTF folders
5+
$ rm -rf WTF
6+
$ rm -rf JavaScriptCore
7+
8+
- Check out JavaScriptCore / WTF from webkit.org
9+
$ svn co https://svn.webkit.org/repository/webkit/tags/Safari-538.12.1/Source/WTF
10+
$ svn co https://svn.webkit.org/repository/webkit/tags/Safari-538.12.1/Source/JavaScriptCore
11+
12+
- Open WTF.xcodeproj
13+
- Select "WTF" project, go to "Info" tab
14+
- Under "Configurations": for each config of "WTF" (Debug, Release, ...) change the config file to "WTF-iOS-Static"
15+
16+
17+
18+
- Add JavaScriptCore-iOS-Static.xcconfig and ToolExecutable-iOS-Static.xcconfig to JavaScriptCore
19+
20+
- Duplicate target JSCLLIntOffsetsExtractor
21+
- Rename to "JSCLLIntOffsetsExtractor iOS"
22+
- Rename scheme to "JSCLLIntOffsetsExtractor iOS"
23+
- Change the PRODUCT_NAME setting back to "JSCLLIntOffsetsExtractor"
24+
- Select "JavaScriptCore" project, go to "Info" tab
25+
- Under "Configurations": for each config (Debug, Release, ...) change the config file to "ToolExecutable-iOS-Static"
26+
- Close Xcode
27+
- Open project.pbxproj in an editor
28+
- In the "JSCLLIntOffsetsExtractor iOS" target, replace "com.apple.product-type.tool" with "com.apple.product-type.library.static"
29+
30+
- Duplicate target "Derived Sources"
31+
- Rename to "Derived Sources iOS"
32+
- Rename scheme to "Derived Sources iOS"
33+
- Under "Build Phases" > "Target Dependencies":
34+
- Remove "JSCLLIntOffsetsExtractor"
35+
- Add "JSCLLIntOffsetsExtractor iOS"
36+
- In the "Generate Derived Sources" script, change last line to:
37+
/usr/bin/env ruby JavaScriptCore/offlineasm/asm.rb JavaScriptCore/llint/LowLevelInterpreter.asm ${BUILT_PRODUCTS_DIR}/libJSCLLIntOffsetsExtractor.a LLIntAssembly.h || exit 1
38+
39+
40+
- Duplicate target JavaScriptCore
41+
- Rename to "JavaScriptCore iOS"
42+
- Rename the scheme to "JavaScriptCore iOS"
43+
- Remove "JavaScriptCore-copy-Info.plist" from project
44+
- Remove build settings INFOPLIST_FILE, PRODUCT_NAME and INSTALL_PATH from the new target
45+
- Under "Build Phases" > "Target Dependencies":
46+
- Remove "llmvmForJSC"
47+
- Remove "Derived Sources"
48+
- Add "Derived Sources iOS"
49+
- Select "JavaScriptCore" project, go to "Info" tab
50+
- Under "Configurations": for each config (Debug, Release, ...) change the config file to "JavaScriptCore-iOS-Static"
51+
- Close Xcode
52+
- Open project.pbxproj in an editor
53+
- In the "JavaScriptCore iOS" target, replace "com.apple.product-type.framework" with "com.apple.product-type.library.static"
54+
55+
- Try building the projects from the JavaScriptCore.xcworkspace. There are probably some things that don't compile right away, because of small bugs, probably related to feature #defines. See phoboslabs' patches: https://github.com/phoboslab/JavaScriptCore-iOS/commits/master
56+
57+
- Run `python make.py`
58+
59+
- Grab a cup of coffee while the project builds.... :)
60+
61+
Thoughts for improvement:
62+
---
63+
- It's probably simpler and faster not to make duplicates, but just set the xcconfig files on the existing targets
64+
- The step to mod the script for "Generate Derived Sources" can probably be avoided by mucking with the build settings EXECUTABLE_PREFIX (`lib`) and EXECUTABLE_EXTENSION (`a`) to make the output file name match what the script expects.
65+
- Can the product type be set from an xcconfig file? Perhaps using the PRODUCT_TYPE and/or PACKAGE_TYPE build settings?

0 commit comments

Comments
 (0)