--- qtbase/cmake/QtFeature.cmake 2024-03-05 04:42:01 +++ qtbase/cmake/QtFeature.cmake 2024-04-02 11:29:30 @@ -1149,6 +1149,14 @@ elseif(QT_FEATURE_use_mold_linker) qt_internal_get_mold_linker_flags(mold_flags ERROR_IF_EMPTY) list(APPEND flags "${mold_flags}") + # 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. + elseif(APPLECLANG) + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "15.0.0") + list(APPEND flags "-ld_classic") + endif() endif() endif() set(${out_var} "${flags}" PARENT_SCOPE) --- qtwebengine/cmake/Functions.cmake 2024-03-14 09:50:56 +++ qtwebengine/cmake/Functions.cmake 2024-04-02 22:11:17 @@ -1189,6 +1189,15 @@ endforeach() list(GET archs 0 arch) set(target ${ninjaTarget}_${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(${cmakeTarget} PRIVATE -ld_classic) + endif() + endif() if(QT_IS_MACOS_UNIVERSAL) add_lipo_command(${target} ${buildDir}/${config}) endif()