Changeset 231753 in webkit


Ignore:
Timestamp:
May 14, 2018 5:52:25 AM (6 years ago)
Author:
zandobersek@gmail.com
Message:

[GTK] REGRESSION(r231170) Build broken with Clang 5.0
https://bugs.webkit.org/show_bug.cgi?id=185198

Reviewed by Michael Catanzaro.

.:

  • Source/cmake/WebKitCompilerFlags.cmake: Fall back to the -std=c++1z

compiler flag if -std=c++17 is not supported. If that flag is not
supported either, bail with an error message.

Source/WebCore:

Avoid gperf files using the register keyword which has been made
reserved and as such unusable in C++17.

  • css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
  • css/makeSelectorPseudoElementsMap.py:
  • css/makeprop.pl:
  • css/makevalues.pl:
  • platform/ColorData.gperf:
  • platform/ReferrerPolicy.h: With std::optional forward declaration

gone, explicitly include the WTF Optional.h header.

  • platform/Theme.h: Ditto.
  • platform/network/create-http-header-name-table:

Source/WebKit:

  • Shared/RTCNetwork.h: With std::optional forward declaration gone,

explicitly include the WTF Optional.h header.

Source/WTF:

  • wtf/Compiler.h:
  • wtf/Forward.h: Delete the std::optional forward declaration that is

potentially incompatible with definition provided by the standard library.

  • wtf/Hasher.h:
  • wtf/StdLibExtras.h: In addition to the remaining C++14 configurations,

also use custom std::in_place_t implementation when compiling with
libstdc++ 6.x, which doesn't provide its own.

Location:
trunk
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r231631 r231753  
     12018-05-14  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        [GTK] REGRESSION(r231170) Build broken with Clang 5.0
     4        https://bugs.webkit.org/show_bug.cgi?id=185198
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        * Source/cmake/WebKitCompilerFlags.cmake: Fall back to the -std=c++1z
     9        compiler flag if -std=c++17 is not supported. If that flag is not
     10        supported either, bail with an error message.
     11
    1122018-05-09  Jan Alexander Steffens  <jan.steffens@gmail.com>
    213
  • trunk/Source/WTF/ChangeLog

    r231743 r231753  
     12018-05-14  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        [GTK] REGRESSION(r231170) Build broken with Clang 5.0
     4        https://bugs.webkit.org/show_bug.cgi?id=185198
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        * wtf/Compiler.h:
     9        * wtf/Forward.h: Delete the std::optional forward declaration that is
     10        potentially incompatible with definition provided by the standard library.
     11        * wtf/Hasher.h:
     12        * wtf/StdLibExtras.h: In addition to the remaining C++14 configurations,
     13        also use custom std::in_place_t implementation when compiling with
     14        libstdc++ 6.x, which doesn't provide its own.
     15
    1162018-05-13  Filip Pizlo  <fpizlo@apple.com>
    217
  • trunk/Source/WTF/wtf/Compiler.h

    r231152 r231753  
    7575#elif __cplusplus <= 201402L
    7676#define WTF_CPP_STD_VER 14
     77#elif __cplusplus <= 201703L
     78#define WTF_CPP_STD_VER 17
    7779#endif
    7880#endif
  • trunk/Source/WTF/wtf/Forward.h

    r231337 r231753  
    2222
    2323#include <stddef.h>
    24 
    25 namespace std {
    26 template<typename T> class optional;
    27 }
    2824
    2925namespace WTF {
  • trunk/Source/WTF/wtf/Hasher.h

    r225727 r231753  
    2222
    2323#include <wtf/Forward.h>
     24#include <wtf/Optional.h>
    2425#include <wtf/StdLibExtras.h>
    2526#include <wtf/text/StringHasher.h>
  • trunk/Source/WTF/wtf/StdLibExtras.h

    r231565 r231753  
    544544#endif
    545545
    546 #if __cplusplus < 201703L
     546// Provide in_place_t when not building with -std=c++17, or when building with libstdc++ 6
     547// (which doesn't define the _GLIBCXX_RELEASE macro that's been introduced in libstdc++ 7).
     548#if __cplusplus < 201703L || (defined(__GLIBCXX__) && !defined(_GLIBCXX_RELEASE))
    547549
    548550// These are inline variable for C++17 and later.
  • trunk/Source/WebCore/ChangeLog

    r231749 r231753  
     12018-05-14  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        [GTK] REGRESSION(r231170) Build broken with Clang 5.0
     4        https://bugs.webkit.org/show_bug.cgi?id=185198
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Avoid gperf files using the register keyword which has been made
     9        reserved and as such unusable in C++17.
     10
     11        * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
     12        * css/makeSelectorPseudoElementsMap.py:
     13        * css/makeprop.pl:
     14        * css/makevalues.pl:
     15        * platform/ColorData.gperf:
     16        * platform/ReferrerPolicy.h: With std::optional forward declaration
     17        gone, explicitly include the WTF Optional.h header.
     18        * platform/Theme.h: Ditto.
     19        * platform/network/create-http-header-name-table:
     20
    1212018-05-14  Commit Queue  <commit-queue@webkit.org>
    222
  • trunk/Source/WebCore/css/makeSelectorPseudoClassAndCompatibilityElementMap.py

    r231346 r231753  
    9898#pragma clang diagnostic push
    9999#pragma clang diagnostic ignored "-Wunknown-pragmas"
    100 #pragma clang diagnostic ignored "-Wdeprecated-register"
    101100#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
    102101#endif
     102
     103// Older versions of gperf like to use the `register` keyword.
     104#define register
    103105
    104106namespace WebCore {
  • trunk/Source/WebCore/css/makeSelectorPseudoElementsMap.py

    r231346 r231753  
    9696#pragma clang diagnostic push
    9797#pragma clang diagnostic ignored "-Wunknown-pragmas"
    98 #pragma clang diagnostic ignored "-Wdeprecated-register"
    9998#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
    10099#endif
     100
     101// Older versions of gperf like to use the `register` keyword.
     102#define register
    101103
    102104namespace WebCore {
  • trunk/Source/WebCore/css/makeprop.pl

    r230097 r231753  
    253253#pragma clang diagnostic push
    254254#pragma clang diagnostic ignored \"-Wunknown-pragmas\"
    255 #pragma clang diagnostic ignored \"-Wdeprecated-register\"
    256255#pragma clang diagnostic ignored \"-Wimplicit-fallthrough\"
    257256#endif
     257
     258// Older versions of gperf like to use the `register` keyword.
     259#define register
    258260
    259261namespace WebCore {
  • trunk/Source/WebCore/css/makevalues.pl

    r230212 r231753  
    7777#pragma clang diagnostic push
    7878#pragma clang diagnostic ignored \"-Wunknown-pragmas\"
    79 #pragma clang diagnostic ignored \"-Wdeprecated-register\"
    8079#pragma clang diagnostic ignored \"-Wimplicit-fallthrough\"
    8180#endif
     81
     82// Older versions of gperf like to use the `register` keyword.
     83#define register
    8284
    8385namespace WebCore {
  • trunk/Source/WebCore/platform/ColorData.gperf

    r180036 r231753  
    66#pragma clang diagnostic push
    77#pragma clang diagnostic ignored "-Wunknown-pragmas"
    8 #pragma clang diagnostic ignored "-Wdeprecated-register"
    98#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
    109#endif
     10
     11// Older versions of gperf like to use the `register` keyword.
     12#define register
    1113
    1214namespace WebCore {
  • trunk/Source/WebCore/platform/ReferrerPolicy.h

    r230208 r231753  
    3535#include <wtf/EnumTraits.h>
    3636#include <wtf/Forward.h>
     37#include <wtf/Optional.h>
    3738
    3839namespace WebCore {
  • trunk/Source/WebCore/platform/Theme.h

    r231557 r231753  
    2828#include "ThemeTypes.h"
    2929#include <wtf/Forward.h>
     30#include <wtf/Optional.h>
    3031
    3132namespace WebCore {
  • trunk/Source/WebCore/platform/network/create-http-header-name-table

    r231346 r231753  
    9494#pragma clang diagnostic push
    9595#pragma clang diagnostic ignored "-Wunknown-pragmas"
    96 #pragma clang diagnostic ignored "-Wdeprecated-register"
    9796#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
    9897#endif
     98
     99// Older versions of gperf like to use the `register` keyword.
     100#define register
    99101
    100102namespace WebCore {
  • trunk/Source/WebKit/ChangeLog

    r231744 r231753  
     12018-05-14  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        [GTK] REGRESSION(r231170) Build broken with Clang 5.0
     4        https://bugs.webkit.org/show_bug.cgi?id=185198
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        * Shared/RTCNetwork.h: With std::optional forward declaration gone,
     9        explicitly include the WTF Optional.h header.
     10
    1112018-05-13  Dean Jackson  <dino@apple.com>
    212
  • trunk/Source/WebKit/Shared/RTCNetwork.h

    r229378 r231753  
    3030#include <WebCore/LibWebRTCMacros.h>
    3131#include <webrtc/rtc_base/network.h>
    32 #include <wtf/Forward.h>
     32#include <wtf/Optional.h>
    3333
    3434namespace IPC {
  • trunk/Source/cmake/WebKitCompilerFlags.cmake

    r231170 r231753  
    103103    else ()
    104104        WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS(-fno-exceptions)
    105         WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-std=c++17
    106                                        -fno-rtti)
     105        WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-fno-rtti)
     106
     107        check_cxx_compiler_flag("-std=c++17" CXX_COMPILER_SUPPORTS_CXX17)
     108        if (CXX_COMPILER_SUPPORTS_CXX17)
     109            WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-std=c++17)
     110        else ()
     111            check_cxx_compiler_flag("-std=c++1z" CXX_COMPILER_SUPPORTS_CXX1Z)
     112            if (CXX_COMPILER_SUPPORTS_CXX1Z)
     113                WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-std=c++1z)
     114            else ()
     115                message(FATAL_ERROR "Compiler with C++17 support is required")
     116            endif ()
     117        endif ()
    107118
    108119        if (WIN32)
Note: See TracChangeset for help on using the changeset viewer.