Skip to content

Conversation

@luadebug
Copy link

@luadebug luadebug commented Oct 20, 2025

Back in 2024s problem of PE size exceeding was resolved #2888, but actually the issue is still present and as workaround we need to split tdcore.lib into two part in case we build for Windows OS host, LTO enable flag comes here as helper to enforce splitting into two parts.

Unfortunately .pc generation handler for tdcore_part1.lib & tdcore_part2.lib was not implemented yet. This is attempt to make that splitting work. As microsoft/vcpkg#47690 validates generated .pc would work against vcpkg ci. https://github.com/microsoft/vcpkg/pull/47690/files#diff-bab39c8782e3538fd5a1a88f8c113153002bff5f4410bc4329729a7e9a59e99dR1

FAILED: tdcore.lib 
C:\Windows\system32\cmd.exe /C "cd . && C:\PROGRA~1\MICROS~1\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\lib.exe  /machine:x64 /nologo /out:tdcore.lib @CMakeFiles\tdcore.rsp && cd ."
tdcore.lib : fatal error LNK1248: image size (1022142D3) exceeds maximum allowable size (FFFFFFFF)

ninja: build stopped: subcommand failed.

@levlam
Copy link
Contributor

levlam commented Oct 21, 2025

Is it possible to avoid special handling of td_core with
if ("${TARGET}" STREQUAL "tdcore" AND "${LIBRARY_TYPE}" STREQUAL "INTERFACE_LIBRARY")
and always propagate interface libraries to the final target?
The generator cmake/GeneratePkgConfig.cmake is supposed to be project-agnostic and shouldn't depend on specific names of target or project structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build of tdcore fails with linker error on windows

3 participants