Setup WebCore build to start using unified sources.
authorkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Oct 2017 19:14:51 +0000 (19:14 +0000)
committerkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Oct 2017 19:14:51 +0000 (19:14 +0000)
commit54b459afde8313dfe4dff6aa2f3f06726266b031
treed9891ded1514a7cead4273c191a5a10626e50a62
parentfbd2b3476286da12cf7d11d146a917867eeb0027
Setup WebCore build to start using unified sources.
https://bugs.webkit.org/show_bug.cgi?id=178362

Reviewed by Tim Horton.

.:

Pass features to the unified source bundler script.

* Source/cmake/WebKitCommon.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmake/WebKitMacros.cmake:

Source/JavaScriptCore:

Change comments in source list files. Also, pass explicit names for build files.

* CMakeLists.txt:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* Sources.txt:
* SourcesGTK.txt:
* SourcesMac.txt:

Source/WebCore:

This patch adds all the long tooling needed to start adding
unified sources to WebCore. Most of the source list files
are empty to start but will be filled over the next few days.

I started by moving all the non-derived bindings code to
unified sources to make sure everything worked correctly.

* CMakeLists.txt:
* Configurations/GenerateUnifiedSources.xcconfig: Added.
* Configurations/WebCore.xcconfig:
* PlatformMac.cmake:
* Sources.txt: Added.
* SourcesCocoa.txt: Added.
* SourcesIOS.txt: Added.
* SourcesMac.txt: Added.
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this...

Source/WTF:

There are a number of changes to the bundler script. First, it is
now possible to enable or disable building files based on if the
associated feature flag is enabled or not. The syntax for this is
similar to how we do #ifs in C++ code. e.g.

#if ENABLE_APPLE_PAY
    myApplePayFile.cpp
#endif

would enable myApplePayFile.cpp if and only if the APPLE_PAY
feature define is set.

I also changed comments from # to // to make it less likely they
would be confused with a #if.

Finally, this patch enables bundling files in the same relative
directory across source list files. Previously, if
SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had
platform/cf/bar.cpp those files would not be put in the same
unified source bundle. Now, those files will be put into the same
bundle but bar.cpp will always follow foo.cpp. The idea is that by
putting more specific files after more general files we can avoid
random build failures.

* Scripts/generate-unified-source-bundles.rb:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
ChangeLog
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/PlatformGTK.cmake
Source/JavaScriptCore/PlatformMac.cmake
Source/JavaScriptCore/Sources.txt
Source/JavaScriptCore/SourcesGTK.txt
Source/JavaScriptCore/SourcesMac.txt
Source/WTF/ChangeLog
Source/WTF/Scripts/generate-unified-source-bundles.rb
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/Configurations/GenerateUnifiedSources.xcconfig [new file with mode: 0644]
Source/WebCore/Configurations/WebCore.xcconfig
Source/WebCore/PlatformMac.cmake
Source/WebCore/Sources.txt [new file with mode: 0644]
Source/WebCore/SourcesCocoa.txt [new file with mode: 0644]
Source/WebCore/SourcesIOS.txt [new file with mode: 0644]
Source/WebCore/SourcesMac.txt [new file with mode: 0644]
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSMediaStreamCapabilitiesCustom.cpp [deleted file]
Source/cmake/WebKitCommon.cmake
Source/cmake/WebKitFeatures.cmake
Source/cmake/WebKitMacros.cmake