summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2023-04-20 11:06:18 +0200
committerMichal Klocek <michal.klocek@qt.io>2023-05-03 12:35:32 +0200
commit4aca44bbf6d63c6a73cb9c3220055a39c4cbd2b1 (patch)
treebf07aa6d82ab140c291900b04641ff0c9c457b4b /src
parentbd1d854d03f169f005511b2204d124dc05213571 (diff)
downloadqtwebengine-4aca44bbf6d63c6a73cb9c3220055a39c4cbd2b1.tar.gz
Fix build race condition between data_dep and WebEngineCore.stamp
For v8 context generator data_dep race condition occurs on universal builds. As data_dep is runtime dependency, it will be not included into our linker WebEngineCore.stamp, changing the behavior in gn would look ugly as it would require introducing another flag to just to handle this case to force this dependency for build time. Therefore add extra v8_context_snapshot.stamp to cmake to cover that case. Change-Id: Ia8b2320fc8e615235bde483d282dfca73a38f215 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/core/CMakeLists.txt24
-rw-r--r--src/core/api/CMakeLists.txt5
-rw-r--r--src/pdf/CMakeLists.txt9
3 files changed, 34 insertions, 4 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index f3909eb16..40ef0c2af 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -562,7 +562,20 @@ target_include_directories(WebEngineCore PRIVATE
${buildDir}/$<CONFIG>/${arch}/gen/third_party/perfetto/build_config
)
-add_gn_build_aritfacts_to_target(WebEngineCore QtWebEngineCore core ${buildDir} FALSE)
+set(stamps QtWebEngineCore.stamp)
+if(QT_FEATURE_webengine_v8_context_snapshot)
+ set(dataStamp obj/tools/v8_context_snapshot/v8_context_snapshot.stamp)
+endif()
+
+add_gn_build_aritfacts_to_target(
+ CMAKE_TARGET WebEngineCore
+ NINJA_TARGET QtWebEngineCore
+ MODULE core
+ BUILDDIR ${buildDir}
+ COMPLETE_STATIC FALSE
+ NINJA_STAMP QtWebEngineCore.stamp
+ NINJA_DATA_STAMP ${dataStamp}
+)
add_dependencies(WebEngineCore run_core_NinjaDone)
if(COIN_BUG_699)
set_property(TARGET WebEngineCore PROPERTY CXX_LINKER_LAUNCHER ${PROJECT_BINARY_DIR}/linker_ulimit.sh)
@@ -604,7 +617,14 @@ if(QT_FEATURE_webengine_spellchecker AND NOT CMAKE_CROSSCOMPILING)
../3rdparty/chromium/third_party/boringssl/src/include
${buildDir}/$<CONFIG>/${arch}/gen
)
- add_gn_build_aritfacts_to_target(${dict_target_name} convert_dict core ${buildDir} FALSE)
+ add_gn_build_aritfacts_to_target(
+ CMAKE_TARGET ${dict_target_name}
+ NINJA_TARGET convert_dict
+ MODULE core
+ BUILDDIR ${buildDir}
+ COMPLETE_STATIC FALSE
+ NINJA_STAMP convert_dict.stamp
+ )
add_dependencies(${dict_target_name} run_core_NinjaDone)
add_dependencies(${dict_target_name} WebEngineCore)
endif()
diff --git a/src/core/api/CMakeLists.txt b/src/core/api/CMakeLists.txt
index 9954139e5..de4c6520b 100644
--- a/src/core/api/CMakeLists.txt
+++ b/src/core/api/CMakeLists.txt
@@ -115,6 +115,8 @@ set(resourceList qtwebengine_resources.pak
qtwebengine_resources_200p.pak
qtwebengine_devtools_resources.pak)
+set(stamps ${buildDir}/${config}/${arch}/QtWebEngineCore.stamp)
+
if(QT_FEATURE_webengine_v8_context_snapshot AND NOT MACOS)
list(APPEND resourceList v8_context_snapshot.bin)
elseif(QT_FEATURE_webengine_v8_context_snapshot)
@@ -123,6 +125,7 @@ elseif(QT_FEATURE_webengine_v8_context_snapshot)
get_filename_component(resSourcePath ${buildDir}/${config}/${arch}/v8_context_snapshot.${arch}.bin REALPATH)
list(APPEND resourceFiles ${resSourcePath})
endforeach()
+ set(stamps ${stamps} ${buildDir}/${config}/${arch}/obj/tools/v8_context_snapshot/v8_context_snapshot.stamp)
endforeach()
endif()
@@ -158,7 +161,7 @@ if(QT_FEATURE_framework)
GENERATED TRUE
)
- add_custom_command(OUTPUT ${allResourceFiles} DEPENDS ${buildDir}/${config}/${arch}/QtWebEngineCore.stamp)
+ add_custom_command(OUTPUT ${allResourceFiles} DEPENDS "${stamps}")
add_custom_target(generate_resources_${config} DEPENDS ${allResourceFiles})
addCopyCommand(WebEngineCore "${localeFiles}"
diff --git a/src/pdf/CMakeLists.txt b/src/pdf/CMakeLists.txt
index e84248b6a..f4b03e33a 100644
--- a/src/pdf/CMakeLists.txt
+++ b/src/pdf/CMakeLists.txt
@@ -226,6 +226,13 @@ endforeach()
get_architectures(archs)
list(GET archs 0 arch)
target_include_directories(Pdf PRIVATE ${buildDir}/$<CONFIG>/${arch}/gen)
-add_gn_build_aritfacts_to_target(Pdf QtPdf pdf ${buildDir} TRUE)
+add_gn_build_aritfacts_to_target(
+ CMAKE_TARGET Pdf
+ NINJA_TARGET QtPdf
+ MODULE pdf
+ BUILDDIR ${buildDir}
+ COMPLETE_STATIC TRUE
+ NINJA_STAMP QtPdf.stamp
+)
add_dependencies(Pdf run_pdf_NinjaDone)