Skip to content

Commit f1de386

Browse files
Make generate-unified-sources.sh not depend on features being listed in FEATURE_DEFINES environment variable
https://bugs.webkit.org/show_bug.cgi?id=212420 Reviewed by Don Olmstead. .: * Source/cmake/WebKitCommon.cmake: Removed call to SET_CONFIGURATION_FOR_UNIFIED_SOURCE_LISTS. * Source/cmake/WebKitFeatures.cmake: Removed SET_CONFIGURATION_FOR_UNIFIED_SOURCE_LISTS. * Source/cmake/WebKitMacros.cmake: Removed use of "--feature-flags" when invoking the generate-unified-source-bundles.rb, which also means no longer depending on the UNIFIED_SOURCE_LIST_ENABLED_FEATURES variable, which was set by the SET_CONFIGURATION_FOR_UNIFIED_SOURCE_LISTS function. Source/JavaScriptCore: * Scripts/generate-unified-sources.sh: Removed many unneeded quote marks from the invocation of generate-unified-source-bundles.rb. Source/WebCore: * Scripts/generate-unified-sources.sh: Added code to include sources from SourcesCocoaInternalSDK.txt, only if USE_INTERNAL_SDK is YES. Removed --feature-flags argument from invocation of generate-unified-source-bundles.rb. Removed many unnecessary quotes. * SourcesCocoa.txt: Removed the names of the files from the internal SDK. * SourcesCocoaInternalSDK.txt: Added. Moved those names here. * html/MediaElementSession.cpp: Added some includes, apparently needed because of different groupings of unified sources. Source/WebKit: * Scripts/generate-unified-sources.sh: Removed --feature-flags from the arguments passed to generate-unified-source-bundles.rb. Also removed many unneeded quotes. Source/WebKitLegacy: * scripts/generate-unified-sources.sh: Removed --feature-flags from the arguments passed to generate-unified-source-bundles.rb. Also removed many unneeded quotes. Source/WTF: * Scripts/generate-unified-source-bundles.rb: Removed the --feature-flags command line option along with the code that implements it. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@263935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 63666b5 commit f1de386

17 files changed

+122
-59
lines changed

ChangeLog

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
2020-07-03 Darin Adler <[email protected]>
2+
3+
Make generate-unified-sources.sh not depend on features being listed in FEATURE_DEFINES environment variable
4+
https://bugs.webkit.org/show_bug.cgi?id=212420
5+
6+
Reviewed by Don Olmstead.
7+
8+
* Source/cmake/WebKitCommon.cmake: Removed call to SET_CONFIGURATION_FOR_UNIFIED_SOURCE_LISTS.
9+
* Source/cmake/WebKitFeatures.cmake: Removed SET_CONFIGURATION_FOR_UNIFIED_SOURCE_LISTS.
10+
* Source/cmake/WebKitMacros.cmake: Removed use of "--feature-flags" when invoking the
11+
generate-unified-source-bundles.rb, which also means no longer depending on the
12+
UNIFIED_SOURCE_LIST_ENABLED_FEATURES variable, which was set by the
13+
SET_CONFIGURATION_FOR_UNIFIED_SOURCE_LISTS function.
14+
115
2020-07-03 Sam Weinig <[email protected]>
216

317
Remove support for ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE

Source/JavaScriptCore/ChangeLog

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2020-07-03 Darin Adler <[email protected]>
2+
3+
Make generate-unified-sources.sh not depend on features being listed in FEATURE_DEFINES environment variable
4+
https://bugs.webkit.org/show_bug.cgi?id=212420
5+
6+
Reviewed by Don Olmstead.
7+
8+
* Scripts/generate-unified-sources.sh: Removed many unneeded quote marks from the
9+
invocation of generate-unified-source-bundles.rb.
10+
111
2020-07-04 Darin Adler <[email protected]>
212

313
Update comment in FeatureDefines.xcconfig since PlatformEnableCocoa.h should be used instead

Source/JavaScriptCore/Scripts/generate-unified-sources.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ if [ $# -eq 0 ]; then
2121
echo "Using unified source list files: Sources.txt, SourcesCocoa.txt"
2222
fi
2323

24-
/usr/bin/env ruby "${BUILD_SCRIPTS_DIR}/generate-unified-source-bundles.rb" "--derived-sources-path" "${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore" "--source-tree-path" "${SRCROOT}" "--max-cpp-bundle-count" "${UnifiedSourceCppFileCount}" "--max-obj-c-bundle-count" "${UnifiedSourceMmFileCount}" "Sources.txt" "SourcesCocoa.txt" "${ARGS[@]}" > /dev/null
24+
/usr/bin/env ruby "${BUILD_SCRIPTS_DIR}/generate-unified-source-bundles.rb" --derived-sources-path "${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore" --source-tree-path "${SRCROOT}" --max-cpp-bundle-count ${UnifiedSourceCppFileCount} --max-obj-c-bundle-count ${UnifiedSourceMmFileCount} Sources.txt SourcesCocoa.txt "${ARGS[@]}" > /dev/null

Source/WTF/ChangeLog

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2020-07-03 Darin Adler <[email protected]>
2+
3+
Make generate-unified-sources.sh not depend on features being listed in FEATURE_DEFINES environment variable
4+
https://bugs.webkit.org/show_bug.cgi?id=212420
5+
6+
Reviewed by Don Olmstead.
7+
8+
* Scripts/generate-unified-source-bundles.rb: Removed the --feature-flags
9+
command line option along with the code that implements it.
10+
111
2020-07-03 Sam Weinig <[email protected]>
212

313
Remove support for ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE

Source/WTF/Scripts/generate-unified-source-bundles.rb

+6-23
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def usage(message)
5050
puts "--generate-xcfilelists Generate .xcfilelist files"
5151
puts "--input-xcfilelist-path Path of the generated input .xcfilelist file"
5252
puts "--output-xcfilelist-path Path of the generated output .xcfilelist file"
53-
puts "--feature-flags (-f) Space or semicolon separated list of enabled feature flags"
5453
puts
5554
puts "Generation options:"
5655
puts "--max-cpp-bundle-count Use global sequential numbers for cpp bundle filenames and set the limit on the number"
@@ -64,7 +63,6 @@ def usage(message)
6463
$derivedSourcesPath = nil
6564
$unifiedSourceOutputPath = nil
6665
$sourceTreePath = nil
67-
$featureFlags = {}
6866
$verbose = false
6967
$mode = :GenerateBundles
7068
$inputXCFilelistPath = nil
@@ -81,7 +79,6 @@ def log(text)
8179
['--verbose', '-v', GetoptLong::NO_ARGUMENT],
8280
['--derived-sources-path', '-d', GetoptLong::REQUIRED_ARGUMENT],
8381
['--source-tree-path', '-s', GetoptLong::REQUIRED_ARGUMENT],
84-
['--feature-flags', '-f', GetoptLong::REQUIRED_ARGUMENT],
8582
['--print-bundled-sources', GetoptLong::NO_ARGUMENT],
8683
['--print-all-sources', GetoptLong::NO_ARGUMENT],
8784
['--generate-xcfilelists', GetoptLong::NO_ARGUMENT],
@@ -101,8 +98,6 @@ def log(text)
10198
when '--source-tree-path'
10299
$sourceTreePath = Pathname.new(arg)
103100
usage("Source tree #{arg} does not exist.") if !$sourceTreePath.exist?
104-
when '--feature-flags'
105-
arg.gsub(/\s+/, ";").split(";").map { |x| $featureFlags[x] = true }
106101
when '--print-bundled-sources'
107102
$mode = :PrintBundledSources
108103
when '--print-all-sources'
@@ -128,7 +123,6 @@ def log(text)
128123
usage("--derived-sources-path must be specified.") if !$unifiedSourceOutputPath
129124
usage("--source-tree-path must be specified.") if !$sourceTreePath
130125
log("Putting unified sources in #{$unifiedSourceOutputPath}")
131-
log("Active Feature flags: #{$featureFlags.keys.inspect}")
132126

133127
usage("At least one source list file must be specified.") if ARGV.length == 0
134128
# Even though CMake will only pass us a single semicolon separated arguemnts, we separate all the arguments for simplicity.
@@ -313,7 +307,6 @@ def ProcessFileForUnifiedSourceGeneration(sourceFile)
313307
| path, sourceFileIndex |
314308
log("Reading #{path}")
315309
result = []
316-
inDisabledLines = false
317310
File.read(path).lines.each {
318311
| line |
319312
commentStart = line =~ COMMENT_REGEXP
@@ -323,26 +316,16 @@ def ProcessFileForUnifiedSourceGeneration(sourceFile)
323316
log("After: #{line}")
324317
end
325318
line.strip!
326-
if line == "#endif"
327-
inDisabledLines = false
328-
next
329-
end
330319

331-
next if line.empty? || inDisabledLines
320+
next if line.empty?
332321

333-
if line =~ /\A#if/
334-
raise "malformed #if" unless line =~ /\A#if\s+(\S+)/
335-
inDisabledLines = !$featureFlags[$1]
336-
else
337-
if seen[line]
338-
next if $mode == :GenerateXCFilelists
339-
raise "duplicate line: #{line} in #{path}"
340-
end
341-
seen[line] = true
342-
result << SourceFile.new(line, sourceFileIndex)
322+
if seen[line]
323+
next if $mode == :GenerateXCFilelists
324+
raise "duplicate line: #{line} in #{path}"
343325
end
326+
seen[line] = true
327+
result << SourceFile.new(line, sourceFileIndex)
344328
}
345-
raise "Couldn't find closing \"#endif\"" if inDisabledLines
346329

347330
log("Found #{result.length} source files in #{path}")
348331
sourceFiles += result

Source/WebCore/ChangeLog

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
2020-07-04 Darin Adler <[email protected]>
2+
3+
Make generate-unified-sources.sh not depend on features being listed in FEATURE_DEFINES environment variable
4+
https://bugs.webkit.org/show_bug.cgi?id=212420
5+
6+
Reviewed by Don Olmstead.
7+
8+
* Scripts/generate-unified-sources.sh: Added code to include sources from
9+
SourcesCocoaInternalSDK.txt, only if USE_INTERNAL_SDK is YES. Removed --feature-flags
10+
argument from invocation of generate-unified-source-bundles.rb. Removed many
11+
unnecessary quotes.
12+
13+
* SourcesCocoa.txt: Removed the names of the files from the internal SDK.
14+
* SourcesCocoaInternalSDK.txt: Added. Moved those names here.
15+
16+
* html/MediaElementSession.cpp: Added some includes, apparently needed because of different
17+
groupings of unified sources.
18+
119
2020-07-04 Zalan Bujtas <[email protected]>
220

321
[LFC] Used dedicated paint margin structures

Source/WebCore/Scripts/generate-unified-sources.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,9 @@ if [ $# -eq 0 ]; then
2121
echo "Using unified source list files: Sources.txt, SourcesCocoa.txt"
2222
fi
2323

24-
/usr/bin/env ruby "${BUILD_SCRIPTS_DIR}/generate-unified-source-bundles.rb" "--derived-sources-path" "${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore" "--source-tree-path" "${SRCROOT}" "--feature-flags" "${FEATURE_DEFINES}" "--max-cpp-bundle-count" "${UnifiedSourceCppFileCount}" "--max-obj-c-bundle-count" "${UnifiedSourceMmFileCount}" "--dense-bundle-filter" "JS*" "--dense-bundle-filter" "bindings/js/*" "Sources.txt" "SourcesCocoa.txt" "${ARGS[@]}" > /dev/null
24+
SOURCES="Sources.txt SourcesCocoa.txt"
25+
if [ "${USE_INTERNAL_SDK}" == "YES" ]; then
26+
SOURCES="${SOURCES} SourcesCocoaInternalSDK.txt"
27+
fi
28+
29+
/usr/bin/env ruby "${BUILD_SCRIPTS_DIR}/generate-unified-source-bundles.rb" --derived-sources-path "${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore" --source-tree-path "${SRCROOT}" --max-cpp-bundle-count ${UnifiedSourceCppFileCount} --max-obj-c-bundle-count ${UnifiedSourceMmFileCount} --dense-bundle-filter "JS*" --dense-bundle-filter "bindings/js/*" $SOURCES "${ARGS[@]}" > /dev/null

Source/WebCore/SourcesCocoa.txt

-19
Original file line numberDiff line numberDiff line change
@@ -584,22 +584,3 @@ platform/graphics/angle/TemporaryANGLESetting.cpp @no-unify
584584
// Derived Sources
585585

586586
WHLSLStandardLibraryFunctionMap.cpp
587-
588-
// FIXME: These files need to be conditional because of USE_INTERNAL_SDK,
589-
// not the specific features they implement, and should be merged into a
590-
// single list with a single #if.
591-
592-
#if ENABLE_MAC_GESTURE_EVENTS
593-
dom/mac/GestureEvents.cpp
594-
JSGestureEvent.cpp
595-
#endif
596-
597-
#if ENABLE_IOS_TOUCH_EVENTS
598-
JSTouch.cpp
599-
JSTouchEvent.cpp
600-
JSTouchList.cpp
601-
#endif
602-
603-
#if ENABLE_IOS_GESTURE_EVENTS
604-
JSGestureEvent.cpp
605-
#endif
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Copyright (C) 2017-2020 Apple Inc. All rights reserved.
2+
//
3+
// Redistribution and use in source and binary forms, with or without
4+
// modification, are permitted provided that the following conditions
5+
// are met:
6+
// 1. Redistributions of source code must retain the above copyright
7+
// notice, this list of conditions and the following disclaimer.
8+
// 2. Redistributions in binary form must reproduce the above copyright
9+
// notice, this list of conditions and the following disclaimer in the
10+
// documentation and/or other materials provided with the distribution.
11+
//
12+
// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
13+
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
14+
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15+
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
16+
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
17+
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
18+
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
19+
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
20+
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
21+
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
22+
// THE POSSIBILITY OF SUCH DAMAGE.
23+
24+
// FIXME: Consider moving this file into the internal SDK, changing the
25+
// generate-unified-sources.sh script to look for it there.
26+
27+
JSGestureEvent.cpp
28+
JSTouch.cpp
29+
JSTouchEvent.cpp
30+
JSTouchList.cpp
31+
dom/mac/GestureEvents.cpp

Source/WebCore/html/MediaElementSession.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929

3030
#include "MediaElementSession.h"
3131

32+
#include "Chrome.h"
33+
#include "ChromeClient.h"
3234
#include "Document.h"
3335
#include "DocumentLoader.h"
3436
#include "Frame.h"

Source/WebKit/ChangeLog

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
2020-07-03 Darin Adler <[email protected]>
2+
3+
Make generate-unified-sources.sh not depend on features being listed in FEATURE_DEFINES environment variable
4+
https://bugs.webkit.org/show_bug.cgi?id=212420
5+
6+
Reviewed by Don Olmstead.
7+
8+
* Scripts/generate-unified-sources.sh: Removed --feature-flags from the
9+
arguments passed to generate-unified-source-bundles.rb. Also removed many
10+
unneeded quotes.
11+
112
2020-07-04 Darin Adler <[email protected]>
213

314
Update comment in FeatureDefines.xcconfig since PlatformEnableCocoa.h should be used instead

Source/WebKit/Scripts/generate-unified-sources.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ if [ $# -eq 0 ]; then
2121
echo "Using unified source list files: Sources.txt, SourcesCocoa.txt"
2222
fi
2323

24-
/usr/bin/env ruby "${BUILD_SCRIPTS_DIR}/generate-unified-source-bundles.rb" "--derived-sources-path" "${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit2" "--source-tree-path" "${SRCROOT}" "--feature-flags" "${FEATURE_DEFINES}" "--max-cpp-bundle-count" "${UnifiedSourceCppFileCount}" "--max-obj-c-bundle-count" "${UnifiedSourceMmFileCount}" "Sources.txt" "SourcesCocoa.txt" "${ARGS[@]}" > /dev/null
24+
/usr/bin/env ruby "${BUILD_SCRIPTS_DIR}/generate-unified-source-bundles.rb" --derived-sources-path "${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit2" --source-tree-path "${SRCROOT}" --max-cpp-bundle-count ${UnifiedSourceCppFileCount} --max-obj-c-bundle-count ${UnifiedSourceMmFileCount} Sources.txt SourcesCocoa.txt "${ARGS[@]}" > /dev/null

Source/WebKitLegacy/ChangeLog

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
2020-07-03 Darin Adler <[email protected]>
2+
3+
Make generate-unified-sources.sh not depend on features being listed in FEATURE_DEFINES environment variable
4+
https://bugs.webkit.org/show_bug.cgi?id=212420
5+
6+
Reviewed by Don Olmstead.
7+
8+
* scripts/generate-unified-sources.sh: Removed --feature-flags from the
9+
arguments passed to generate-unified-source-bundles.rb. Also removed many
10+
unneeded quotes.
11+
112
2020-07-02 Alex Christensen <[email protected]>
213

314
Update Mac CMake build

Source/WebKitLegacy/scripts/generate-unified-sources.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ if [ $# -eq 0 ]; then
2121
echo "Using unified source list files: Sources.txt, SourcesCocoa.txt"
2222
fi
2323

24-
/usr/bin/env ruby "${BUILD_SCRIPTS_DIR}/generate-unified-source-bundles.rb" "--derived-sources-path" "${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy" "--source-tree-path" "${SRCROOT}" "--feature-flags" "${FEATURE_DEFINES}" "--max-cpp-bundle-count" "${UnifiedSourceCppFileCount}" "--max-obj-c-bundle-count" "${UnifiedSourceMmFileCount}" "Sources.txt" "SourcesCocoa.txt" "${ARGS[@]}" > /dev/null
24+
/usr/bin/env ruby "${BUILD_SCRIPTS_DIR}/generate-unified-source-bundles.rb" --derived-sources-path "${BUILT_PRODUCTS_DIR}/DerivedSources/WebKitLegacy" --source-tree-path "${SRCROOT}" --max-cpp-bundle-count ${UnifiedSourceCppFileCount} --max-obj-c-bundle-count ${UnifiedSourceMmFileCount} Sources.txt SourcesCocoa.txt "${ARGS[@]}" > /dev/null

Source/cmake/WebKitCommon.cmake

-2
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,4 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
9898
# config.h
9999
# -----------------------------------------------------------------------------
100100
CREATE_CONFIGURATION_HEADER()
101-
102-
SET_CONFIGURATION_FOR_UNIFIED_SOURCE_LISTS()
103101
endif ()

Source/cmake/WebKitFeatures.cmake

-8
Original file line numberDiff line numberDiff line change
@@ -401,14 +401,6 @@ macro(CREATE_CONFIGURATION_HEADER)
401401
file(REMOVE "${CMAKE_BINARY_DIR}/cmakeconfig.h.tmp")
402402
endmacro()
403403

404-
macro(SET_CONFIGURATION_FOR_UNIFIED_SOURCE_LISTS)
405-
foreach (_variable_name ${_WEBKIT_CONFIG_FILE_VARIABLES})
406-
if (${${_variable_name}})
407-
list(APPEND UNIFIED_SOURCE_LIST_ENABLED_FEATURES ${_variable_name})
408-
endif ()
409-
endforeach ()
410-
endmacro()
411-
412404
macro(WEBKIT_CHECK_HAVE_INCLUDE _variable _header)
413405
check_include_file(${_header} ${_variable}_value)
414406
SET_AND_EXPOSE_TO_BUILD(${_variable} ${${_variable}_value})

Source/cmake/WebKitMacros.cmake

-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ macro(WEBKIT_COMPUTE_SOURCES _framework)
1717
"--derived-sources-path" "${_derivedSourcesPath}"
1818
"--source-tree-path" ${CMAKE_CURRENT_SOURCE_DIR}
1919
"--print-bundled-sources"
20-
"--feature-flags" "${UNIFIED_SOURCE_LIST_ENABLED_FEATURES}"
2120
${_sourceListFileTruePaths}
2221
RESULT_VARIABLE _resultTmp
2322
OUTPUT_VARIABLE _outputTmp)
@@ -35,7 +34,6 @@ macro(WEBKIT_COMPUTE_SOURCES _framework)
3534
execute_process(COMMAND ${RUBY_EXECUTABLE} ${WTF_SCRIPTS_DIR}/generate-unified-source-bundles.rb
3635
"--derived-sources-path" "${_derivedSourcesPath}"
3736
"--source-tree-path" ${CMAKE_CURRENT_SOURCE_DIR}
38-
"--feature-flags" "${UNIFIED_SOURCE_LIST_ENABLED_FEATURES}"
3937
${_sourceListFileTruePaths}
4038
RESULT_VARIABLE _resultTmp
4139
OUTPUT_VARIABLE _outputTmp)
@@ -52,7 +50,6 @@ macro(WEBKIT_COMPUTE_SOURCES _framework)
5250
"--derived-sources-path" "${_derivedSourcesPath}"
5351
"--source-tree-path" ${CMAKE_CURRENT_SOURCE_DIR}
5452
"--print-all-sources"
55-
"--feature-flags" "${UNIFIED_SOURCE_LIST_ENABLED_FEATURES}"
5653
${_sourceListFileTruePaths}
5754
RESULT_VARIABLE _resultTmp
5855
OUTPUT_VARIABLE _outputTmp)

0 commit comments

Comments
 (0)