WebKit Bugzilla
Attachment 339119 Details for
Bug 185135
: Use some C++17 features
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
0001-Use-C-17.patch (text/plain), 15.29 KB, created by
JF Bastien
on 2018-04-30 09:56:16 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
JF Bastien
Created:
2018-04-30 09:56:16 PDT
Size:
15.29 KB
patch
obsolete
>From 800ac32deb88e58bba0b8f962de0387238fef134 Mon Sep 17 00:00:00 2001 >From: JF Bastien <jfbastien@apple.com> >Date: Mon, 30 Apr 2018 09:55:51 -0700 >Subject: [PATCH] Use C++17 > >--- > ChangeLog | 38 ++++++++++++++++++++ > Source/WebCore/ChangeLog | 38 ++++++++++++++++++++ > Source/WebCore/DerivedSources.make | 6 ++-- > Source/WebKit/ChangeLog | 40 ++++++++++++++++++++++ > Source/WebKit/Configurations/Base.xcconfig | 2 +- > Source/WebKit/DerivedSources.make | 2 +- > Source/WebKit/PlatformMac.cmake | 2 +- > Source/WebKitLegacy/ChangeLog | 9 +++++ > Source/WebKitLegacy/PlatformMac.cmake | 2 +- > Source/WebKitLegacy/mac/ChangeLog | 9 +++++ > .../mac/Configurations/WebKitLegacy.xcconfig | 2 +- > Source/cmake/WebKitCompilerFlags.cmake | 2 +- > Tools/ChangeLog | 11 ++++++ > Tools/DumpRenderTree/PlatformMac.cmake | 4 +-- > Tools/gtk/ycm_extra_conf.py | 2 +- > 15 files changed, 157 insertions(+), 12 deletions(-) > >diff --git a/ChangeLog b/ChangeLog >index 652df6f..b7940bb 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,41 @@ >+2018-04-30 JF Bastien <jfbastien@apple.com> >+ >+ Use C++17 >+ https://bugs.webkit.org/show_bug.cgi?id=185135 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ As discussed here [0] let's move WebKit to a subset of C++17. We >+ now require GCC 6 [1] which means that, according to [2] we can >+ use the following C++17 language features (I removed some >+ uninteresting ones): >+ >+ - New auto rules for direct-list-initialization >+ - static_assert with no message >+ - typename in a template template parameter >+ - Nested namespace definition >+ - Attributes for namespaces and enumerators >+ - u8 character literals >+ - Allow constant evaluation for all non-type template arguments >+ - Fold Expressions >+ - Unary fold expressions and empty parameter packs >+ - __has_include in preprocessor conditional >+ - Differing begin and end types in range-based for >+ - Improving std::pair and std::tuple >+ >+ Consult the Tony Tables [3] to see before / after examples. >+ >+ Of course we can use any library feature if we're willing to >+ import them to WTF (and they don't require language support). >+ >+ >+ [0]: https://lists.webkit.org/pipermail/webkit-dev/2018-March/029922.html >+ [1]: https://trac.webkit.org/changeset/231152/webkit >+ [2]: https://en.cppreference.com/w/cpp/compiler_support >+ [3]: https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md >+ >+ * Source/cmake/WebKitCompilerFlags.cmake: >+ > 2018-04-29 Michael Catanzaro <mcatanzaro@igalia.com> > > [CMake] Require GCC 6 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 94ad207..65a9d94 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,41 @@ >+2018-04-30 JF Bastien <jfbastien@apple.com> >+ >+ Use C++17 >+ https://bugs.webkit.org/show_bug.cgi?id=185135 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ As discussed here [0] let's move WebKit to a subset of C++17. We >+ now require GCC 6 [1] which means that, according to [2] we can >+ use the following C++17 language features (I removed some >+ uninteresting ones): >+ >+ - New auto rules for direct-list-initialization >+ - static_assert with no message >+ - typename in a template template parameter >+ - Nested namespace definition >+ - Attributes for namespaces and enumerators >+ - u8 character literals >+ - Allow constant evaluation for all non-type template arguments >+ - Fold Expressions >+ - Unary fold expressions and empty parameter packs >+ - __has_include in preprocessor conditional >+ - Differing begin and end types in range-based for >+ - Improving std::pair and std::tuple >+ >+ Consult the Tony Tables [3] to see before / after examples. >+ >+ Of course we can use any library feature if we're willing to >+ import them to WTF (and they don't require language support). >+ >+ >+ [0]: https://lists.webkit.org/pipermail/webkit-dev/2018-March/029922.html >+ [1]: https://trac.webkit.org/changeset/231152/webkit >+ [2]: https://en.cppreference.com/w/cpp/compiler_support >+ [3]: https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md >+ >+ * DerivedSources.make: >+ > 2018-04-30 Michael Catanzaro <mcatanzaro@igalia.com> > > [GTK] Webkit should spoof as Safari on a Mac when on Chase.com >diff --git a/Source/WebCore/DerivedSources.make b/Source/WebCore/DerivedSources.make >index db75786..ac0b6f1 100644 >--- a/Source/WebCore/DerivedSources.make >+++ b/Source/WebCore/DerivedSources.make >@@ -1015,19 +1015,19 @@ ifeq ($(USE_LLVM_TARGET_TRIPLES_FOR_CLANG),YES) > TARGET_TRIPLE_FLAGS=-target $(CURRENT_ARCH)-$(LLVM_TARGET_TRIPLE_VENDOR)-$(LLVM_TARGET_TRIPLE_OS_VERSION)$(LLVM_TARGET_TRIPLE_SUFFIX) > endif > >-ifeq ($(shell $(CC) -std=gnu++14 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ' WTF_PLATFORM_IOS ' | cut -d' ' -f3), 1) >+ifeq ($(shell $(CC) -std=gnu++17 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ' WTF_PLATFORM_IOS ' | cut -d' ' -f3), 1) > WTF_PLATFORM_IOS = 1 > else > WTF_PLATFORM_IOS = 0 > endif > >-ifeq ($(shell $(CC) -std=gnu++14 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep USE_APPLE_INTERNAL_SDK | cut -d' ' -f3), 1) >+ifeq ($(shell $(CC) -std=gnu++17 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep USE_APPLE_INTERNAL_SDK | cut -d' ' -f3), 1) > USE_APPLE_INTERNAL_SDK = 1 > else > USE_APPLE_INTERNAL_SDK = 0 > endif > >-ifeq ($(shell $(CC) -std=gnu++14 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ENABLE_ORIENTATION_EVENTS | cut -d' ' -f3), 1) >+ifeq ($(shell $(CC) -std=gnu++17 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ENABLE_ORIENTATION_EVENTS | cut -d' ' -f3), 1) > ENABLE_ORIENTATION_EVENTS = 1 > endif > >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 2ca3cdf..7f7f1f2 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,43 @@ >+2018-04-30 JF Bastien <jfbastien@apple.com> >+ >+ Use C++17 >+ https://bugs.webkit.org/show_bug.cgi?id=185135 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ As discussed here [0] let's move WebKit to a subset of C++17. We >+ now require GCC 6 [1] which means that, according to [2] we can >+ use the following C++17 language features (I removed some >+ uninteresting ones): >+ >+ - New auto rules for direct-list-initialization >+ - static_assert with no message >+ - typename in a template template parameter >+ - Nested namespace definition >+ - Attributes for namespaces and enumerators >+ - u8 character literals >+ - Allow constant evaluation for all non-type template arguments >+ - Fold Expressions >+ - Unary fold expressions and empty parameter packs >+ - __has_include in preprocessor conditional >+ - Differing begin and end types in range-based for >+ - Improving std::pair and std::tuple >+ >+ Consult the Tony Tables [3] to see before / after examples. >+ >+ Of course we can use any library feature if we're willing to >+ import them to WTF (and they don't require language support). >+ >+ >+ [0]: https://lists.webkit.org/pipermail/webkit-dev/2018-March/029922.html >+ [1]: https://trac.webkit.org/changeset/231152/webkit >+ [2]: https://en.cppreference.com/w/cpp/compiler_support >+ [3]: https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md >+ >+ * Configurations/Base.xcconfig: >+ * DerivedSources.make: >+ * PlatformMac.cmake: >+ > 2018-04-28 Andy Estes <aestes@apple.com> > > [iOS] Present an action sheet when long-pressing on PDF links >diff --git a/Source/WebKit/Configurations/Base.xcconfig b/Source/WebKit/Configurations/Base.xcconfig >index 6354498..b07a5b1 100644 >--- a/Source/WebKit/Configurations/Base.xcconfig >+++ b/Source/WebKit/Configurations/Base.xcconfig >@@ -128,7 +128,7 @@ SUPPORTS_TEXT_BASED_API[sdk=appletv*] = NO; > SUPPORTS_TEXT_BASED_API[sdk=watch*] = NO; > > OTHER_TAPI_FLAGS = $(OTHER_TAPI_FLAGS_$(WK_COCOA_TOUCH)); >-OTHER_TAPI_FLAGS_cocoatouch = -x objective-c++ -std=c++14 -fno-rtti -DRELEASE_WITHOUT_OPTIMIZATIONS; >+OTHER_TAPI_FLAGS_cocoatouch = -x objective-c++ -std=c++17 -fno-rtti -DRELEASE_WITHOUT_OPTIMIZATIONS; > TAPI_VERIFY_MODE[sdk=iphone*] = Pedantic; > > // This is required to make LLVM_TARGET_TRIPLE_SUFFIX propagate into scripts. >diff --git a/Source/WebKit/DerivedSources.make b/Source/WebKit/DerivedSources.make >index 1e4cc51..f78d027 100644 >--- a/Source/WebKit/DerivedSources.make >+++ b/Source/WebKit/DerivedSources.make >@@ -268,7 +268,7 @@ AUTOMATION_PROTOCOL_OUTPUT_FILES = \ > # > > ifeq ($(OS),MACOS) >-ifeq ($(shell $(CC) -std=gnu++14 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ' WTF_PLATFORM_IOS ' | cut -d' ' -f3), 1) >+ifeq ($(shell $(CC) -std=gnu++17 -x c++ -E -P -dM $(SDK_FLAGS) $(TARGET_TRIPLE_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ' WTF_PLATFORM_IOS ' | cut -d' ' -f3), 1) > AUTOMATION_BACKEND_PLATFORM_ARGUMENTS = --platform iOS > else > AUTOMATION_BACKEND_PLATFORM_ARGUMENTS = --platform macOS >diff --git a/Source/WebKit/PlatformMac.cmake b/Source/WebKit/PlatformMac.cmake >index 2fa81a9..3d63120 100644 >--- a/Source/WebKit/PlatformMac.cmake >+++ b/Source/WebKit/PlatformMac.cmake >@@ -1,4 +1,4 @@ >-add_definitions("-ObjC++ -std=c++14") >+add_definitions("-ObjC++ -std=c++17") > find_library(APPLICATIONSERVICES_LIBRARY ApplicationServices) > find_library(CARBON_LIBRARY Carbon) > find_library(QUARTZ_LIBRARY Quartz) >diff --git a/Source/WebKitLegacy/ChangeLog b/Source/WebKitLegacy/ChangeLog >index 688b84e..f15b1c2 100644 >--- a/Source/WebKitLegacy/ChangeLog >+++ b/Source/WebKitLegacy/ChangeLog >@@ -1,3 +1,12 @@ >+2018-04-30 JF Bastien <jfbastien@apple.com> >+ >+ Use C++17 >+ https://bugs.webkit.org/show_bug.cgi?id=185135 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * PlatformMac.cmake: >+ > 2018-04-16 Youenn Fablet <youenn@apple.com> > > Use NetworkLoadChecker to handle synchronous HTTP loads >diff --git a/Source/WebKitLegacy/PlatformMac.cmake b/Source/WebKitLegacy/PlatformMac.cmake >index 0cbe38f..abc9f3a 100644 >--- a/Source/WebKitLegacy/PlatformMac.cmake >+++ b/Source/WebKitLegacy/PlatformMac.cmake >@@ -396,7 +396,7 @@ set(C99_FILES > foreach (_file ${WebKitLegacy_SOURCES}) > list(FIND C99_FILES ${_file} _c99_index) > if (${_c99_index} EQUAL -1) >- set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS "-ObjC++ -std=c++14") >+ set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS "-ObjC++ -std=c++17") > else () > set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS -std=c99) > endif () >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index 56fd0cb..46f0835 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,12 @@ >+2018-04-30 JF Bastien <jfbastien@apple.com> >+ >+ Use C++17 >+ https://bugs.webkit.org/show_bug.cgi?id=185135 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Configurations/WebKitLegacy.xcconfig: >+ > 2018-04-27 Chris Dumez <cdumez@apple.com> > > Use WindowProxy instead of DOMWindow in our IDL >diff --git a/Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig b/Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig >index e6d3f1b..5596736 100644 >--- a/Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig >+++ b/Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig >@@ -139,5 +139,5 @@ WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR_YES = "$(WK_OVERRIDE_FRAMEWORKS_DIR)"; > SUPPORTS_TEXT_BASED_API[sdk=iphone*] = $(USE_INTERNAL_SDK); > SUPPORTS_TEXT_BASED_API[sdk=appletv*] = NO; > SUPPORTS_TEXT_BASED_API[sdk=watch*] = NO; >-OTHER_TAPI_FLAGS[sdk=iphone*] = -x objective-c++ -std=c++14 -fno-rtti -DRELEASE_WITHOUT_OPTIMIZATIONS; >+OTHER_TAPI_FLAGS[sdk=iphone*] = -x objective-c++ -std=c++17 -fno-rtti -DRELEASE_WITHOUT_OPTIMIZATIONS; > TAPI_VERIFY_MODE[sdk=iphone*] = Pedantic; >diff --git a/Source/cmake/WebKitCompilerFlags.cmake b/Source/cmake/WebKitCompilerFlags.cmake >index cd17ddd..79cae5ff 100644 >--- a/Source/cmake/WebKitCompilerFlags.cmake >+++ b/Source/cmake/WebKitCompilerFlags.cmake >@@ -102,7 +102,7 @@ if (COMPILER_IS_GCC_OR_CLANG) > -Wno-unknown-argument) > else () > WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS(-fno-exceptions) >- WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-std=c++14 >+ WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-std=c++17 > -fno-rtti) > > if (WIN32) >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index efa7fe4..8dfa805 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,14 @@ >+2018-04-30 JF Bastien <jfbastien@apple.com> >+ >+ Use C++17 >+ https://bugs.webkit.org/show_bug.cgi?id=185135 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * DumpRenderTree/PlatformMac.cmake: >+ * gtk/ycm_extra_conf.py: >+ (FlagsForFile): >+ > 2018-04-30 Michael Catanzaro <mcatanzaro@igalia.com> > > [GTK] Webkit should spoof as Safari on a Mac when on Chase.com >diff --git a/Tools/DumpRenderTree/PlatformMac.cmake b/Tools/DumpRenderTree/PlatformMac.cmake >index 5d6a399..71b3676 100644 >--- a/Tools/DumpRenderTree/PlatformMac.cmake >+++ b/Tools/DumpRenderTree/PlatformMac.cmake >@@ -106,11 +106,11 @@ foreach (_file ${DumpRenderTree_ObjC_SOURCES}) > endforeach () > > foreach (_file ${DumpRenderTree_Cpp_SOURCES} ${TestNetscapePlugIn_Cpp_SOURCES}) >- set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS "-std=c++14") >+ set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS "-std=c++17") > endforeach () > > foreach (_file ${DumpRenderTree_ObjCpp_SOURCES} ${TestNetscapePlugIn_ObjCpp_SOURCES}) >- set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS "-ObjC++ -std=c++14") >+ set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS "-ObjC++ -std=c++17") > endforeach () > > set(DumpRenderTree_RESOURCES >diff --git a/Tools/gtk/ycm_extra_conf.py b/Tools/gtk/ycm_extra_conf.py >index 2b85cc6..c1309bc 100644 >--- a/Tools/gtk/ycm_extra_conf.py >+++ b/Tools/gtk/ycm_extra_conf.py >@@ -93,7 +93,7 @@ def FlagsForFile(filename, **kwargs): > 'do_cache': (Boolean) True if the result should be cached. > """ > >- result = {'flags': ['-std=c++11', '-x', 'c++'], 'do_cache': True} >+ result = {'flags': ['-std=c++17', '-x', 'c++'], 'do_cache': True} > > # Headers can't be built, so we get the source file flags instead. > if filename.endswith('.h'): >-- >2.10.1 >
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 185135
:
339119
|
339122
|
339124
|
339129
|
339144