summaryrefslogtreecommitdiffstats
path: root/src/process
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2021-08-18 10:41:36 +0200
committerMichal Klocek <michal.klocek@qt.io>2021-08-29 15:54:11 +0200
commit9f4914248a2bf447d4728bc6bc8361dbbfc8709f (patch)
treee15aa7e8984505e28fdc625ae795d3ade810b84e /src/process
parent96e47e1c9b6ce5c71e2560bb95f6e59ce062c8ba (diff)
Add 'amazing' windows linker workaround for rsp files
This should be part of previous patch, however it deserved separate commit message with explanation. On windows cmake generates ninja rules with cmake wrapper for linker in form of: cmake.exe -E vs_link_dll vs_link_dll internal command unfortunately expands all rsp files passed to liker before calling it (it looks for '@') and also swaps the order. This ends in bogus linker call. Make a workaround based on: https://github.com/Kitware/CMake/blob/master/Source/cmcmd.cxx#L2102 Use response files prefixed with 'CMakeFiles' so internal command of cmake will skip the processing. Since rsp files must now start with filename and not with filepath we also need to copy them to directory where we call the linker. Task-number: QTBUG-95590 Pick-to: 6.2 Change-Id: I8e96ebf3a9ac7c7d751db6682ce37f38880be793 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/process')
-rw-r--r--src/process/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/process/CMakeLists.txt b/src/process/CMakeLists.txt
index 87adc0c88..9b515f1d9 100644
--- a/src/process/CMakeLists.txt
+++ b/src/process/CMakeLists.txt
@@ -17,6 +17,9 @@ if(WIN32)
target_sources(${qtWebEngineProcessName} PRIVATE support_win.cpp)
target_link_libraries(${qtWebEngineProcessName} PRIVATE WebEngineCoreSandbox)
set_property(TARGET ${qtWebEngineProcessName} PROPERTY WIN32_EXECUTABLE TRUE)
+ # get libs rsp file, since cmake is not aware of PUBLIC libs for WebEngineCore
+ get_target_property(libs_rsp WebEngineCore LIBS_RSP)
+ target_link_options(${qtWebEngineProcessName} PRIVATE "@${libs_rsp}")
endif()
target_link_libraries(${qtWebEngineProcessName}