WebKit Bugzilla
Attachment 358118 Details for
Bug 193045
: Add ENABLE_UNIFIED_BUILDS option to cmake ports
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193045-20181228181452.patch (text/plain), 8.90 KB, created by
Yusuke Suzuki
on 2018-12-28 01:14:53 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yusuke Suzuki
Created:
2018-12-28 01:14:53 PST
Size:
8.90 KB
patch
obsolete
>Subversion Revision: 239556 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 4803c26e9159ac9375aca59941896e0b22331842..8f3710625c6905ec2920c695148213791702ae65 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,12 @@ >+2018-12-28 Yusuke Suzuki <yusukesuzuki@slowstart.org> >+ >+ Add ENABLE_UNIFIED_BUILDS option to cmake ports >+ https://bugs.webkit.org/show_bug.cgi?id=193045 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Scripts/generate-unified-source-bundles.rb: >+ > 2018-12-27 Alex Christensen <achristensen@webkit.org> > > Resurrect Mac CMake build >diff --git a/Source/WTF/Scripts/generate-unified-source-bundles.rb b/Source/WTF/Scripts/generate-unified-source-bundles.rb >index 8880e6f7488f11b7f4f9b597b0b9b2cba15713bc..6ffbf086f4b7df7dd71d4741426249c7c1f8be04 100644 >--- a/Source/WTF/Scripts/generate-unified-source-bundles.rb >+++ b/Source/WTF/Scripts/generate-unified-source-bundles.rb >@@ -45,6 +45,7 @@ def usage(message) > puts > puts "Optional arguments:" > puts "--print-bundled-sources Print bundled sources rather than generating sources" >+ puts "--print-all-sources Print all sources rather than generating sources" > puts "--generate-xcfilelists Generate .xcfilelist files" > puts "--input-xcfilelist-path Path of the generated input .xcfilelist file" > puts "--output-xcfilelist-path Path of the generated output .xcfilelist file" >@@ -78,6 +79,7 @@ def log(text) > ['--source-tree-path', '-s', GetoptLong::REQUIRED_ARGUMENT], > ['--feature-flags', '-f', GetoptLong::REQUIRED_ARGUMENT], > ['--print-bundled-sources', GetoptLong::NO_ARGUMENT], >+ ['--print-all-sources', GetoptLong::NO_ARGUMENT], > ['--generate-xcfilelists', GetoptLong::NO_ARGUMENT], > ['--input-xcfilelist-path', GetoptLong::REQUIRED_ARGUMENT], > ['--output-xcfilelist-path', GetoptLong::REQUIRED_ARGUMENT], >@@ -98,6 +100,8 @@ def log(text) > arg.gsub(/\s+/, ";").split(";").map { |x| $featureFlags[x] = true } > when '--print-bundled-sources' > $mode = :PrintBundledSources >+ when '--print-all-sources' >+ $mode = :PrintAllSources > when '--generate-xcfilelists' > $mode = :GenerateXCFilelists > when '--input-xcfilelist-path' >@@ -323,6 +327,8 @@ def ProcessFileForUnifiedSourceGeneration(sourceFile) > case $mode > when :GenerateBundles, :GenerateXCFilelists > ProcessFileForUnifiedSourceGeneration(sourceFile) >+ when :PrintAllSources >+ $generatedSources << sourceFile > when :PrintBundledSources > $generatedSources << sourceFile if $bundleManagers[sourceFile.path.extname] && sourceFile.unifiable > end >diff --git a/Source/cmake/WebKitFeatures.cmake b/Source/cmake/WebKitFeatures.cmake >index 657ed0cfbf47f876614a75739a6c5f8ef02a8dcb..4a3f88efc15a93564947f794675b4e1caa72d789 100644 >--- a/Source/cmake/WebKitFeatures.cmake >+++ b/Source/cmake/WebKitFeatures.cmake >@@ -192,6 +192,7 @@ macro(WEBKIT_OPTION_BEGIN) > WEBKIT_OPTION_DEFINE(ENABLE_TEXT_AUTOSIZING "Toggle automatic text size adjustment support" PRIVATE OFF) > WEBKIT_OPTION_DEFINE(ENABLE_TOUCH_EVENTS "Toggle Touch Events support" PRIVATE OFF) > WEBKIT_OPTION_DEFINE(ENABLE_TOUCH_SLIDER "Toggle Touch Slider support" PRIVATE OFF) >+ WEBKIT_OPTION_DEFINE(ENABLE_UNIFIED_BUILDS "Toggle unified builds" PRIVATE ON) > WEBKIT_OPTION_DEFINE(ENABLE_USERSELECT_ALL "Toggle user-select:all support" PRIVATE ON) > WEBKIT_OPTION_DEFINE(ENABLE_USER_MESSAGE_HANDLERS "Toggle user script message handler support" PRIVATE ON) > WEBKIT_OPTION_DEFINE(ENABLE_VARIATION_FONTS "Toggle variation fonts support" PRIVATE OFF) >diff --git a/Source/cmake/WebKitMacros.cmake b/Source/cmake/WebKitMacros.cmake >index 36e5a0200c92cd692445c1458741a3feab9e29ee..6d58d57e63737e4cc05bcd408a1125be4ced3cca 100644 >--- a/Source/cmake/WebKitMacros.cmake >+++ b/Source/cmake/WebKitMacros.cmake >@@ -16,41 +16,59 @@ macro(WEBKIT_COMPUTE_SOURCES _framework) > set(WTF_SCRIPTS_DIR "${FORWARDING_HEADERS_DIR}/wtf/Scripts") > endif () > >- execute_process(COMMAND ${RUBY_EXECUTABLE} ${WTF_SCRIPTS_DIR}/generate-unified-source-bundles.rb >- "--derived-sources-path" "${DERIVED_SOURCES_DIR}/${_framework}" >- "--source-tree-path" ${CMAKE_CURRENT_SOURCE_DIR} >- "--print-bundled-sources" >- "--feature-flags" "${UNIFIED_SOURCE_LIST_ENABLED_FEATURES}" >- ${_sourceListFileTruePaths} >- RESULT_VARIABLE _resultTmp >- OUTPUT_VARIABLE _outputTmp) >- >- if (${_resultTmp}) >- message(FATAL_ERROR "generate-unified-source-bundles.rb exited with non-zero status, exiting") >- endif () >+ if (ENABLE_UNIFIED_BUILDS) >+ execute_process(COMMAND ${RUBY_EXECUTABLE} ${WTF_SCRIPTS_DIR}/generate-unified-source-bundles.rb >+ "--derived-sources-path" "${DERIVED_SOURCES_DIR}/${_framework}" >+ "--source-tree-path" ${CMAKE_CURRENT_SOURCE_DIR} >+ "--print-bundled-sources" >+ "--feature-flags" "${UNIFIED_SOURCE_LIST_ENABLED_FEATURES}" >+ ${_sourceListFileTruePaths} >+ RESULT_VARIABLE _resultTmp >+ OUTPUT_VARIABLE _outputTmp) >+ >+ if (${_resultTmp}) >+ message(FATAL_ERROR "generate-unified-source-bundles.rb exited with non-zero status, exiting") >+ endif () > >- foreach (_sourceFileTmp IN LISTS _outputTmp) >- set_source_files_properties(${_sourceFileTmp} PROPERTIES HEADER_FILE_ONLY ON) >- list(APPEND ${_framework}_HEADERS ${_sourceFileTmp}) >- endforeach () >- unset(_sourceFileTmp) >- >- execute_process(COMMAND ${RUBY_EXECUTABLE} ${WTF_SCRIPTS_DIR}/generate-unified-source-bundles.rb >- "--derived-sources-path" "${DERIVED_SOURCES_DIR}/${_framework}" >- "--source-tree-path" ${CMAKE_CURRENT_SOURCE_DIR} >- "--feature-flags" "${UNIFIED_SOURCE_LIST_ENABLED_FEATURES}" >- ${_sourceListFileTruePaths} >- RESULT_VARIABLE _resultTmp >- OUTPUT_VARIABLE _outputTmp) >- >- if (${_resultTmp}) >- message(FATAL_ERROR "generate-unified-source-bundles.rb exited with non-zero status, exiting") >- endif () >+ foreach (_sourceFileTmp IN LISTS _outputTmp) >+ set_source_files_properties(${_sourceFileTmp} PROPERTIES HEADER_FILE_ONLY ON) >+ list(APPEND ${_framework}_HEADERS ${_sourceFileTmp}) >+ endforeach () >+ unset(_sourceFileTmp) >+ >+ execute_process(COMMAND ${RUBY_EXECUTABLE} ${WTF_SCRIPTS_DIR}/generate-unified-source-bundles.rb >+ "--derived-sources-path" "${DERIVED_SOURCES_DIR}/${_framework}" >+ "--source-tree-path" ${CMAKE_CURRENT_SOURCE_DIR} >+ "--feature-flags" "${UNIFIED_SOURCE_LIST_ENABLED_FEATURES}" >+ ${_sourceListFileTruePaths} >+ RESULT_VARIABLE _resultTmp >+ OUTPUT_VARIABLE _outputTmp) >+ >+ if (${_resultTmp}) >+ message(FATAL_ERROR "generate-unified-source-bundles.rb exited with non-zero status, exiting") >+ endif () > >- list(APPEND ${_framework}_SOURCES ${_outputTmp}) >- unset(_platformSourcesFile) >- unset(_resultTmp) >- unset(_outputTmp) >+ list(APPEND ${_framework}_SOURCES ${_outputTmp}) >+ unset(_resultTmp) >+ unset(_outputTmp) >+ else () >+ execute_process(COMMAND ${RUBY_EXECUTABLE} ${WTF_SCRIPTS_DIR}/generate-unified-source-bundles.rb >+ "--derived-sources-path" "${DERIVED_SOURCES_DIR}/${_framework}" >+ "--source-tree-path" ${CMAKE_CURRENT_SOURCE_DIR} >+ "--print-all-sources" >+ "--feature-flags" "${UNIFIED_SOURCE_LIST_ENABLED_FEATURES}" >+ ${_sourceListFileTruePaths} >+ RESULT_VARIABLE _resultTmp >+ OUTPUT_VARIABLE _outputTmp) >+ >+ if (${_resultTmp}) >+ message(FATAL_ERROR "generate-unified-source-bundles.rb exited with non-zero status, exiting") >+ endif () >+ >+ list(APPEND ${_framework}_SOURCES ${_outputTmp}) >+ unset(_resultTmp) >+ unset(_outputTmp) >+ endif () > endmacro() > > macro(WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS) >diff --git a/ChangeLog b/ChangeLog >index 1079b98a15d104d94ac501bcab06e6477a08f0f4..dacdb97146c881cb478c26346d99d50ee98103c1 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,17 @@ >+2018-12-28 Yusuke Suzuki <yusukesuzuki@slowstart.org> >+ >+ Add ENABLE_UNIFIED_BUILDS option to cmake ports >+ https://bugs.webkit.org/show_bug.cgi?id=193045 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This patch adds ENABLE_UNIFIED_BUILDS option to cmake ports, which allows us to disable Unified Builds in WebKit. >+ This makes `compile_commands.json` sane when the unified builds is disabled, and various tools can use this >+ compilation database. For example, YouCompleteMe completion server can use it. >+ >+ * Source/cmake/WebKitFeatures.cmake: >+ * Source/cmake/WebKitMacros.cmake: >+ > 2018-12-27 Alex Christensen <achristensen@webkit.org> > > Resurrect Mac CMake build
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
Flags:
don.olmstead
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193045
:
358115
|
358116
|
358117
| 358118