summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Functions.cmake15
1 files changed, 13 insertions, 2 deletions
diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake
index f22e96056..40554ad6b 100644
--- a/cmake/Functions.cmake
+++ b/cmake/Functions.cmake
@@ -458,8 +458,10 @@ function(add_linker_options target buildDir completeStatic)
target_link_options(${cmakeTarget}
PRIVATE /DELAYLOAD:mf.dll /DELAYLOAD:mfplat.dll /DELAYLOAD:mfreadwrite.dll /DELAYLOAD:winmm.dll
)
- # enable larger PDBs
- target_link_options(${cmakeTarget} PRIVATE "/pdbpagesize:8192")
+ # enable larger PDBs if webenginecore debug build
+ if(cmakeTarget STREQUAL "WebEngineCore")
+ target_link_options(${cmakeTarget} PRIVATE "$<$<CONFIG:Debug>:/pdbpagesize:8192>")
+ endif()
endif()
target_link_options(${cmakeTarget} PRIVATE "$<$<CONFIG:${config}>:@${objects_rsp}>")
if(NOT completeStatic)
@@ -1192,6 +1194,15 @@ function(add_gn_build_artifacts_to_target)
endforeach()
list(GET archs 0 arch)
set(target ${arg_NINJA_TARGET}_${config}_${arch})
+ # Work around for broken builds with new Apple linker ld_prime. Force
+ # use of the classic linker until this has been fixed.
+ # TODO: remove once this has been fixed by Apple. See issue FB13667242
+ # or QTBUG-122655 for details.
+ if(APPLECLANG)
+ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "15.0.0")
+ target_link_options(${arg_CMAKE_TARGET} PRIVATE -ld_classic)
+ endif()
+ endif()
if(QT_IS_MACOS_UNIVERSAL)
add_lipo_command(${target} ${arg_BUILDDIR}/${config})
endif()