Skip to content
Permalink
Browse files
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:


Canonical link: https://commits.webkit.org/194673@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
kmiller68 committed Oct 18, 2017
1 parent d9a19a0 commit 3bf3880e58685999d86aa1e7d7a3471058bedb86
@@ -1,3 +1,16 @@
2017-10-18 Keith Miller <keith_miller@apple.com>

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:

2017-10-18 Zan Dobersek <zdobersek@igalia.com>

Remove remnants of OpenWebRTC
@@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 2.8.12)
include(WebKitCommon)
set_property(DIRECTORY . PROPERTY FOLDER "JavaScriptCore")

list(APPEND JavaScriptCore_UNIFIED_SOURCE_LIST_FILES
"Sources.txt"
)

set(JavaScriptCore_INCLUDE_DIRECTORIES
"${CMAKE_BINARY_DIR}"
"${JAVASCRIPTCORE_DIR}"
@@ -48,8 +52,6 @@ set(JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES
"${ICU_INCLUDE_DIRS}"
)

WEBKIT_COMPUTE_SOURCES(JavaScriptCore)

set(JavaScriptCore_OBJECT_LUT_SOURCES
runtime/ArrayConstructor.cpp
runtime/ArrayIteratorPrototype.cpp
@@ -601,6 +603,7 @@ target_include_directories(LLIntOffsetsExtractor PRIVATE ${JavaScriptCore_INCLUD

add_subdirectory(shell)

WEBKIT_COMPUTE_SOURCES(JavaScriptCore)
WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
WEBKIT_FRAMEWORK(JavaScriptCore)

@@ -1,3 +1,19 @@
2017-10-18 Keith Miller <keith_miller@apple.com>

Setup WebCore build to start using unified sources.
https://bugs.webkit.org/show_bug.cgi?id=178362

Reviewed by Tim Horton.

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:

2017-10-18 Commit Queue <commit-queue@webkit.org>

Unreviewed, rolling out r223321.
@@ -1,5 +1,9 @@
set(JavaScriptCore_OUTPUT_NAME javascriptcoregtk-${WEBKITGTK_API_VERSION})

list(APPEND JavaScriptCore_UNIFIED_SOURCE_LIST_FILES
"SourcesGTK.txt"
)

list(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
"${JAVASCRIPTCORE_DIR}/inspector/remote/glib"
)
@@ -5,6 +5,10 @@ list(APPEND JavaScriptCore_LIBRARIES
${SECURITY_LIBRARY}
)

list(APPEND JavaScriptCore_UNIFIED_SOURCE_LIST_FILES
"SourcesMac.txt"
)

list(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
${JAVASCRIPTCORE_DIR}/disassembler/udis86
${JAVASCRIPTCORE_DIR}/icu
@@ -1,25 +1,25 @@
# Copyright (C) 2017 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
// Copyright (C) 2017 Apple Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.

API/JSBase.cpp
API/JSCTestRunnerUtils.cpp
@@ -547,7 +547,7 @@ inspector/ScriptCallStack.cpp
inspector/ScriptCallStackFactory.cpp
inspector/ScriptDebugServer.cpp

# Derived Sources
// Derived Sources
inspector/InspectorBackendDispatchers.cpp
inspector/InspectorFrontendDispatchers.cpp
inspector/InspectorProtocolObjects.cpp
@@ -632,8 +632,8 @@ llint/LLIntEntrypoint.cpp
llint/LLIntExceptions.cpp
llint/LLIntSlowPaths.cpp
llint/LLIntThunks.cpp
# FIXME: We can't bundle this file due to a clang bug.
llint/LowLevelInterpreter.cpp #@no-unify
// FIXME: We can't bundle this file due to a clang bug.
llint/LowLevelInterpreter.cpp @no-unify

parser/Lexer.cpp
parser/ModuleAnalyzer.cpp
@@ -923,8 +923,8 @@ runtime/WeakMapPrototype.cpp
runtime/WeakSetConstructor.cpp
runtime/WeakSetPrototype.cpp

# Derived Sources
# FIXME: We should move this to runtime but it kept breaking the Windows build in weird ways... https://bugs.webkit.org/show_bug.cgi?id=177486
// Derived Sources
// FIXME: We should move this to runtime but it kept breaking the Windows build in weird ways... https://bugs.webkit.org/show_bug.cgi?id=177486
JSCBuiltins.cpp

tools/CellList.cpp
@@ -1003,5 +1003,5 @@ yarr/YarrPattern.cpp
yarr/YarrSyntaxChecker.cpp
yarr/YarrUnicodeProperties.cpp

# Derived Sources
// Derived Sources
yarr/YarrCanonicalizeUnicode.cpp
@@ -1,25 +1,25 @@
# Copyright (C) 2017 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
// Copyright (C) 2017 Apple Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.

API/JSRemoteInspector.cpp

@@ -1,25 +1,25 @@
# Copyright (C) 2017 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
// Copyright (C) 2017 Apple Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.

API/JSAPIWrapperObject.mm
API/JSContext.mm
@@ -1,3 +1,36 @@
2017-10-18 Keith Miller <keith_miller@apple.com>

Setup WebCore build to start using unified sources.
https://bugs.webkit.org/show_bug.cgi?id=178362

Reviewed by Tim Horton.

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:

2017-10-18 Konstantin Tokarev <annulen@yandex.ru>

REGRESSION(r217771): nullTerminatedWCharToString loses last character of input string

0 comments on commit 3bf3880

Please sign in to comment.