RESOLVED FIXED177190
JSC Xcode build should use unified sources for platform independent files
https://bugs.webkit.org/show_bug.cgi?id=177190
Summary JSC Xcode build should use unified sources for platform independent files
Keith Miller
Reported 2017-09-19 13:47:33 PDT
We should add core support for building unified source files to JSC. In the new architecture we platform independent source files should be added to Source/JavaScriptCore/unifiable-sources.txt. For platform specific files the old system remains in place, although in the near future that should change a bit.
Attachments
WIP (588.51 KB, patch)
2017-09-19 13:49 PDT, Keith Miller
no flags
WIP (591.88 KB, patch)
2017-09-19 14:15 PDT, Keith Miller
no flags
Patch (594.42 KB, patch)
2017-09-19 15:31 PDT, Keith Miller
no flags
Patch (590.82 KB, patch)
2017-09-19 15:34 PDT, Keith Miller
no flags
Patch (593.15 KB, patch)
2017-09-20 14:59 PDT, Keith Miller
no flags
Patch for landing (592.87 KB, patch)
2017-09-20 15:29 PDT, Keith Miller
no flags
Keith Miller
Comment 1 2017-09-19 13:49:34 PDT
Keith Miller
Comment 2 2017-09-19 14:15:51 PDT
Keith Miller
Comment 3 2017-09-19 15:31:54 PDT
Keith Miller
Comment 4 2017-09-19 15:34:00 PDT
Saam Barati
Comment 5 2017-09-19 15:37:58 PDT
Comment on attachment 321252 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=321252&action=review > Source/JavaScriptCore/ChangeLog:18 > + there are no spare files. If adding more bunle files becomes bunle =>bundle
Saam Barati
Comment 6 2017-09-19 15:50:15 PDT
Comment on attachment 321252 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=321252&action=review r=me give me them fast builds > Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:9520 > + shellScript = "set -e\n\ncd $SRCROOT\n\nif [ \"${DEPLOYMENT_LOCATION}\" == \"Yes\" ]; then\n BUILD_SCRIPTS_DIR=\"${SDKROOT}/usr/local/include/wtf/scripts\"\nelse\n BUILD_SCRIPTS_DIR=\"${BUILT_PRODUCTS_DIR}/usr/local/include/wtf/scripts\"\nfi\n\nUnifiedSourceCppFileCount=133\n\n/usr/bin/env ruby \"${BUILD_SCRIPTS_DIR}/generate-unified-source-bundles.rb\" \"--derived-sources-path\" \"${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore\" \"--sources-file\" \"unifiable-sources.txt\" \"--max-cpp-bundle-count\" \"${UnifiedSourceCppFileCount}\" \"--max-obj-c-bundle-count\" \"0\" > /dev/null\n"; It'd be great if we could dynamically compute --max-cpp-bundle-count. Perhaps open a bug somewhere to do this? > Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:9787 > + 536B318B1F71C5990037FC33 /* UnifiedSource129.cpp in Sources */, It'd be great if we could find a way to dynamically generate this. Maybe it's worth filing a bug somewhere so we don't forget about this annoyance of using unified builds. > Source/WTF/scripts/generate-unified-source-bundles.rb:115 > + raise "number of bundles for #{extension} sources, #{@bundleCount}, exceeded limit, #{@maxCount}. Please add #{bundleFileName} to Xcode" Let's also make this print the variable thingy you need to change and the value you need to change it to via the Xcode GUI that passes into max-cpp-bundle-count
Geoffrey Garen
Comment 7 2017-09-19 17:34:12 PDT
Comment on attachment 321252 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=321252&action=review > Source/JavaScriptCore/ChangeLog:23 > + * unifiable-sources.txt: Added. Do we plan to have some other source list that is not unifiable? If not (and I hope not), then we should just call this Sources.txt.
Keith Miller
Comment 8 2017-09-20 14:59:53 PDT
Saam Barati
Comment 9 2017-09-20 15:02:41 PDT
Comment on attachment 321376 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=321376&action=review r=me > Source/JavaScriptCore/ChangeLog:22 > + LowLevelInterpreter.cpp can't be added to the unified source list yet > + due to a clang bug. can you link to or create a bugzilla bug to track this so we don't forget to update things on our end. > ChangeLog:20 > +2017-09-20 Keith Miller <keith_miller@apple.com> > + > + JSC Xcode build should use unified sources for platform independent files > + https://bugs.webkit.org/show_bug.cgi?id=177190 > + > + Reviewed by NOBODY (OOPS!). > + > + * Source/cmake/WebKitMacros.cmake: > + > +2017-09-19 Keith Miller <keith_miller@apple.com> > + > + JSC Xcode build should use unified sources for platform independent files > + https://bugs.webkit.org/show_bug.cgi?id=177190 > + > + Reviewed by NOBODY (OOPS!). > + > + Add a macro for collecting the set of "header" source files and adding the bundle > + files to the "sources" list. > + > + * Source/cmake/WebKitMacros.cmake: double changelog here.
Keith Miller
Comment 10 2017-09-20 15:29:09 PDT
Created attachment 321381 [details] Patch for landing
Keith Miller
Comment 11 2017-09-20 15:30:05 PDT
Comment on attachment 321376 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=321376&action=review >> Source/JavaScriptCore/ChangeLog:22 >> + due to a clang bug. > > can you link to or create a bugzilla bug to track this so we don't forget to update things on our end. Done: https://bugs.webkit.org/show_bug.cgi?id=177277 >> ChangeLog:20 >> + * Source/cmake/WebKitMacros.cmake: > > double changelog here. Whoops, Fixed.
WebKit Commit Bot
Comment 12 2017-09-20 16:08:54 PDT
Comment on attachment 321381 [details] Patch for landing Clearing flags on attachment: 321381 Committed r222297: <http://trac.webkit.org/changeset/222297>
WebKit Commit Bot
Comment 13 2017-09-20 16:08:56 PDT
All reviewed patches have been landed. Closing bug.
Olivier Blin
Comment 14 2017-09-25 09:32:49 PDT
In generate-unified-source-bundles.rb, there is a typo in the directory name, a 'r' char is missing: "unified-souces"
Keith Miller
Comment 15 2017-09-25 09:35:25 PDT
(In reply to Olivier Blin from comment #14) > In generate-unified-source-bundles.rb, there is a typo in the directory > name, a 'r' char is missing: "unified-souces" Yeah, I noticed that and fixed it in: https://bugs.webkit.org/show_bug.cgi?id=177421
Radar WebKit Bug Importer
Comment 16 2017-09-27 12:20:18 PDT
Note You need to log in before you can comment on or make changes to this bug.