Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 1 | From 4718888071e29deb8b245b88c81577fd5bac4e5e Mon Sep 17 00:00:00 2001 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
| 3 | Date: Mon, 29 Aug 2016 16:38:11 +0300 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 4 | Subject: [PATCH] Fix racy parallel build of WebKit2-4.0.gir |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 5 | |
| 6 | Upstream-Status: Pending |
| 7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
| 8 | |
| 9 | --- |
| 10 | Source/WebKit/PlatformGTK.cmake | 9 +++++---- |
| 11 | 1 file changed, 5 insertions(+), 4 deletions(-) |
| 12 | |
| 13 | diff --git a/Source/WebKit/PlatformGTK.cmake b/Source/WebKit/PlatformGTK.cmake |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 14 | index a069c5f6..ea2f542b 100644 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 15 | --- a/Source/WebKit/PlatformGTK.cmake |
| 16 | +++ b/Source/WebKit/PlatformGTK.cmake |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 17 | @@ -650,8 +650,9 @@ if (ENABLE_INTROSPECTION) |
| 18 | set(GIR_SOURCES_TOP_DIRS "--sources-top-dirs=${CMAKE_BINARY_DIR}") |
| 19 | endif () |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 20 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 21 | - add_custom_command( |
| 22 | - OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir |
| 23 | + # This is a target and not a command because it's used to build another .gir |
| 24 | + # and a .typelib, which would trigger two racy parallel builds when using command |
| 25 | + add_custom_target(WebKit2-${WEBKITGTK_API_VERSION}-gir |
| 26 | DEPENDS WebKit |
| 27 | DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir |
| 28 | COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} LDFLAGS= |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 29 | @@ -699,7 +700,7 @@ if (ENABLE_INTROSPECTION) |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 30 | add_custom_command( |
| 31 | OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir |
| 32 | DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir |
| 33 | - DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir |
| 34 | + DEPENDS WebKit2-${WEBKITGTK_API_VERSION}-gir |
| 35 | COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} |
| 36 | LDFLAGS="${INTROSPECTION_ADDITIONAL_LDFLAGS}" |
| 37 | ${LOADER_LIBRARY_PATH_VAR}="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 38 | @@ -761,7 +762,7 @@ if (ENABLE_INTROSPECTION) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 39 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 40 | add_custom_command( |
| 41 | OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib |
| 42 | - DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir |
| 43 | + DEPENDS WebKit2-${WEBKITGTK_API_VERSION}-gir |
| 44 | COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir -o ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.typelib |
| 45 | ) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 46 | |