WebKit Bugzilla
Attachment 356658 Details for
Bug 192391
: Use directory local sequential numbers for Unified Sources filenames instead of global sequential numbers for CMake
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Test Xcode bots after adding --use-hash-filenames option
bug-192391-20181205233026.patch (text/plain), 5.12 KB, created by
Carlos Bentzen
on 2018-12-05 14:30:27 PST
(
hide
)
Description:
Test Xcode bots after adding --use-hash-filenames option
Filename:
MIME Type:
Creator:
Carlos Bentzen
Created:
2018-12-05 14:30:27 PST
Size:
5.12 KB
patch
obsolete
>Subversion Revision: 238908 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 2591746e6e71820537f6f9d49bea0f23bb1673a5..f8fc06a3e3edc55127227bf246b2e6a36e1ee3ec 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,22 @@ >+2018-12-05 Carlos Eduardo Ramalho <cadubentzen@gmail.com> >+ >+ Use hash in Unified Sources filename instead of ascending integers >+ https://bugs.webkit.org/show_bug.cgi?id=192391 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Change Unified Sources naming convention from UnifiedSourceXYZ.cpp with XYZ being an integer to >+ UnifiedSource-hash.cpp. With ascending integer, every new bundle added would shift the next ones and >+ prevent compiler caches from speeding up consecutive builds e.g. in git-bisect sessions. >+ >+ The hash is calculated based on the text content of the UnifiedSource, so only bundles which have their >+ content modified will be rebuilt in consecutive builds. >+ >+ This is affecting only CMake builds which is where the '--use-hash-filenames' option is set. >+ Xcode builds still use the old convention. >+ >+ * Scripts/generate-unified-source-bundles.rb: Use a 12-characters SHA1 digest in filename when passed --use-hash-filenames option. >+ > 2018-12-04 Carlos Garcia Campos <cgarcia@igalia.com> > > [SOUP] Move URLSoup back to WebCore after r238771 >diff --git a/Source/WTF/Scripts/generate-unified-source-bundles.rb b/Source/WTF/Scripts/generate-unified-source-bundles.rb >index 8880e6f7488f11b7f4f9b597b0b9b2cba15713bc..0aaecdfa27a143f8a8d2ff9757b96da6dd06c62b 100644 >--- a/Source/WTF/Scripts/generate-unified-source-bundles.rb >+++ b/Source/WTF/Scripts/generate-unified-source-bundles.rb >@@ -21,6 +21,7 @@ > # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF > # THE POSSIBILITY OF SUCH DAMAGE. > >+require 'digest' > require 'fileutils' > require 'pathname' > require 'getoptlong' >@@ -49,6 +50,7 @@ def usage(message) > puts "--input-xcfilelist-path Path of the generated input .xcfilelist file" > puts "--output-xcfilelist-path Path of the generated output .xcfilelist file" > puts "--feature-flags (-f) Space or semicolon separated list of enabled feature flags" >+ puts "--use-hash-filenames Use a hash in unified source filenames instead of ascending integers" > puts > puts "Generation options:" > puts "--max-cpp-bundle-count Sets the limit on the number of cpp bundles that can be generated" >@@ -67,6 +69,7 @@ $inputXCFilelistPath = nil > $outputXCFilelistPath = nil > $maxCppBundleCount = nil > $maxObjCBundleCount = nil >+$useHashFilenames = false > > def log(text) > $stderr.puts text if $verbose >@@ -78,6 +81,7 @@ GetoptLong.new(['--help', '-h', GetoptLong::NO_ARGUMENT], > ['--source-tree-path', '-s', GetoptLong::REQUIRED_ARGUMENT], > ['--feature-flags', '-f', GetoptLong::REQUIRED_ARGUMENT], > ['--print-bundled-sources', GetoptLong::NO_ARGUMENT], >+ ['--use-hash-filenames', GetoptLong::NO_ARGUMENT], > ['--generate-xcfilelists', GetoptLong::NO_ARGUMENT], > ['--input-xcfilelist-path', GetoptLong::REQUIRED_ARGUMENT], > ['--output-xcfilelist-path', GetoptLong::REQUIRED_ARGUMENT], >@@ -108,6 +112,8 @@ GetoptLong.new(['--help', '-h', GetoptLong::NO_ARGUMENT], > $maxCppBundleCount = arg.to_i > when '--max-obj-c-bundle-count' > $maxObjCBundleCount = arg.to_i >+ when '--use-hash-filenames' >+ $useHashFilenames = true > end > } > >@@ -202,7 +208,14 @@ class BundleManager > end > > def bundleFileName(number) >- @extension == "cpp" ? "UnifiedSource#{number}.#{extension}" : "UnifiedSource#{number}-#{extension}.#{extension}" >+ id = >+ if $useHashFilenames >+ # The dash makes the filenames more clear when using a hash. >+ "-" + Digest::SHA1.hexdigest(@currentBundleText)[0..11] >+ else >+ number.to_s >+ end >+ @extension == "cpp" ? "UnifiedSource#{id}.#{extension}" : "UnifiedSource#{id}-#{extension}.#{extension}" > end > > def flush >diff --git a/Source/cmake/WebKitMacros.cmake b/Source/cmake/WebKitMacros.cmake >index 36e5a0200c92cd692445c1458741a3feab9e29ee..565a0c7a09ee66779821f81752867ba358471a8b 100644 >--- a/Source/cmake/WebKitMacros.cmake >+++ b/Source/cmake/WebKitMacros.cmake >@@ -21,6 +21,7 @@ macro(WEBKIT_COMPUTE_SOURCES _framework) > "--source-tree-path" ${CMAKE_CURRENT_SOURCE_DIR} > "--print-bundled-sources" > "--feature-flags" "${UNIFIED_SOURCE_LIST_ENABLED_FEATURES}" >+ "--use-hash-filenames" > ${_sourceListFileTruePaths} > RESULT_VARIABLE _resultTmp > OUTPUT_VARIABLE _outputTmp) >@@ -39,6 +40,7 @@ macro(WEBKIT_COMPUTE_SOURCES _framework) > "--derived-sources-path" "${DERIVED_SOURCES_DIR}/${_framework}" > "--source-tree-path" ${CMAKE_CURRENT_SOURCE_DIR} > "--feature-flags" "${UNIFIED_SOURCE_LIST_ENABLED_FEATURES}" >+ "--use-hash-filenames" > ${_sourceListFileTruePaths} > RESULT_VARIABLE _resultTmp > OUTPUT_VARIABLE _outputTmp)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192391
:
356571
|
356572
|
356658
|
356715
|
358073
|
358091
|
358576