Build is broken with EVENT_LOOP_TYPE=GLib
authoraperez@igalia.com <aperez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Jun 2020 20:52:02 +0000 (20:52 +0000)
committeraperez@igalia.com <aperez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Jun 2020 20:52:02 +0000 (20:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=212987

Reviewed by Konstantin Tokarev.

.:

* Source/cmake/OptionsJSCOnly.cmake: Add gio-unix as a required component of the GLib
package, as it is needed for the remote inspector support with EVENT_LOOP_TYPE=GLib.

Source/JavaScriptCore:

* PlatformJSCOnly.cmake: Add sources needed to support the remote inspector to
JavaScriptCore_SOURCES.

Source/WTF:

* wtf/CurrentTime.cpp: Make sure that <time.h> is included to get clock_gettime() and
friends defined when USE_GLIB is disabled.
* wtf/PlatformJSCOnly.cmake: Use FileSystemGLib instead of FileSystemPOSIX when
EVENT_LOOP_TYPE=GLib is set, add missing sources needed when ENABLE_REMOTE_INSPECTOR
is set.
* wtf/glib/RunLoopSourcePriority.h: Use the same list of priorities for WPE and JSCOnly.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@262973 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/PlatformJSCOnly.cmake
Source/WTF/ChangeLog
Source/WTF/wtf/CurrentTime.cpp
Source/WTF/wtf/PlatformJSCOnly.cmake
Source/WTF/wtf/glib/RunLoopSourcePriority.h
Source/cmake/OptionsJSCOnly.cmake

index 80c4de4..109329f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2020-06-12  Adrian Perez de Castro  <aperez@igalia.com>
+
+        Build is broken with EVENT_LOOP_TYPE=GLib
+        https://bugs.webkit.org/show_bug.cgi?id=212987
+
+        Reviewed by Konstantin Tokarev.
+
+        * Source/cmake/OptionsJSCOnly.cmake: Add gio-unix as a required component of the GLib
+        package, as it is needed for the remote inspector support with EVENT_LOOP_TYPE=GLib.
+
 2020-06-12  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK4] Get MiniBrowser ready for GTK4
index 9ae6267..ee1a267 100644 (file)
@@ -1,3 +1,13 @@
+2020-06-12  Adrian Perez de Castro  <aperez@igalia.com>
+
+        Build is broken with EVENT_LOOP_TYPE=GLib
+        https://bugs.webkit.org/show_bug.cgi?id=212987
+
+        Reviewed by Konstantin Tokarev.
+
+        * PlatformJSCOnly.cmake: Add sources needed to support the remote inspector to
+        JavaScriptCore_SOURCES.
+
 2020-06-11  Saam Barati  <sbarati@apple.com>
 
         Linear Scan uses the wrong Interval for spills for tmps with roles of early def or late use
index 7b1e732..d95417a 100644 (file)
@@ -1,6 +1,21 @@
 add_definitions(-DSTATICALLY_LINKED_WITH_WTF)
 
+if (ENABLE_REMOTE_INSPECTOR)
+    list(APPEND JavaScriptCore_SOURCES
+        inspector/remote/RemoteConnectionToTarget.cpp
+        inspector/remote/RemoteControllableTarget.cpp
+        inspector/remote/RemoteInspectionTarget.cpp
+        inspector/remote/RemoteInspector.cpp
+    )
+endif ()
+
 if (USE_GLIB)
+    if (ENABLE_REMOTE_INSPECTOR)
+        list(APPEND JavaScriptCore_SOURCES
+            inspector/remote/glib/RemoteInspectorGlib.cpp
+        )
+    endif ()
+
     list(APPEND JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES
         ${GLIB_INCLUDE_DIRS}
     )
index bc5b4e0..5f5a379 100644 (file)
@@ -1,3 +1,17 @@
+2020-06-12  Adrian Perez de Castro  <aperez@igalia.com>
+
+        Build is broken with EVENT_LOOP_TYPE=GLib
+        https://bugs.webkit.org/show_bug.cgi?id=212987
+
+        Reviewed by Konstantin Tokarev.
+
+        * wtf/CurrentTime.cpp: Make sure that <time.h> is included to get clock_gettime() and
+        friends defined when USE_GLIB is disabled.
+        * wtf/PlatformJSCOnly.cmake: Use FileSystemGLib instead of FileSystemPOSIX when
+        EVENT_LOOP_TYPE=GLib is set, add missing sources needed when ENABLE_REMOTE_INSPECTOR
+        is set.
+        * wtf/glib/RunLoopSourcePriority.h: Use the same list of priorities for WPE and JSCOnly.
+
 2020-06-11  Alex Christensen  <achristensen@webkit.org>
 
         Re-enable download resume tests
index dae9cc5..46e55d4 100644 (file)
@@ -53,6 +53,7 @@
 #include <time.h>
 #else
 #include <sys/time.h>
+#include <time.h>
 #endif
 
 #if OS(FUCHSIA)
index 5b4bad0..6217ca4 100644 (file)
@@ -31,14 +31,12 @@ else ()
     list(APPEND WTF_SOURCES
         generic/MainThreadGeneric.cpp
 
-        posix/FileSystemPOSIX.cpp
         posix/OSAllocatorPOSIX.cpp
         posix/ThreadingPOSIX.cpp
 
         text/unix/TextBreakIteratorInternalICUUnix.cpp
 
         unix/LanguageUnix.cpp
-        unix/UniStdExtrasUnix.cpp
     )
     if (WTF_OS_FUCHSIA)
         list(APPEND WTF_SOURCES
@@ -49,6 +47,19 @@ else ()
             unix/CPUTimeUnix.cpp
         )
     endif ()
+
+    if (LOWERCASE_EVENT_LOOP_TYPE STREQUAL "glib")
+        list(APPEND WTF_SOURCES
+            glib/FileSystemGlib.cpp
+        )
+    else ()
+        list(APPEND WTF_SOURCES
+            posix/FileSystemPOSIX.cpp
+
+            unix/UniStdExtrasUnix.cpp
+        )
+    endif ()
+
 endif ()
 
 if (WIN32)
@@ -107,10 +118,30 @@ if (LOWERCASE_EVENT_LOOP_TYPE STREQUAL "glib")
         glib/GRefPtr.cpp
         glib/RunLoopGLib.cpp
     )
+    list(APPEND WTF_PUBLIC_HEADERS
+        glib/GRefPtr.h
+        glib/GTypedefs.h
+        glib/RunLoopSourcePriority.h
+    )
+
+    if (ENABLE_REMOTE_INSPECTOR)
+        list(APPEND WTF_SOURCES
+            glib/GSocketMonitor.cpp
+            glib/SocketConnection.cpp
+        )
+        list(APPEND WTF_PUBLIC_HEADERS
+            glib/GSocketMonitor.h
+            glib/GUniquePtr.h
+            glib/SocketConnection.h
+        )
+    endif ()
+
     list(APPEND WTF_SYSTEM_INCLUDE_DIRECTORIES
+        ${GIO_UNIX_INCLUDE_DIRS}
         ${GLIB_INCLUDE_DIRS}
     )
     list(APPEND WTF_LIBRARIES
+        ${GIO_UNIX_LIBRARIES}
         ${GLIB_GIO_LIBRARIES}
         ${GLIB_GOBJECT_LIBRARIES}
         ${GLIB_LIBRARIES}
index 24cf535..9c64695 100644 (file)
@@ -82,7 +82,7 @@ enum RunLoopSourcePriority {
     DiskCacheWrite = 200,
 };
 
-#elif PLATFORM(WPE)
+#else
 
 enum RunLoopSourcePriority {
     RunLoopDispatcher = 0,
index bf11e13..316c624 100644 (file)
@@ -87,7 +87,7 @@ endif ()
 
 string(TOLOWER ${EVENT_LOOP_TYPE} LOWERCASE_EVENT_LOOP_TYPE)
 if (LOWERCASE_EVENT_LOOP_TYPE STREQUAL "glib")
-    find_package(GLIB 2.36 REQUIRED COMPONENTS gio gobject)
+    find_package(GLIB 2.36 REQUIRED COMPONENTS gio gio-unix gobject)
     SET_AND_EXPOSE_TO_BUILD(USE_GLIB 1)
     SET_AND_EXPOSE_TO_BUILD(USE_GLIB_EVENT_LOOP 1)
     SET_AND_EXPOSE_TO_BUILD(WTF_DEFAULT_EVENT_LOOP 0)