Skip to content

b12923

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 02 Dec 11:10
02227e8

app : set distinct PDB_NAME for llama-app (#33156)

Overview

On Windows shared builds (BUILD_SHARED_LIBS=ON and LLAMA_BUILD_APP=ON),
both llama (llama.dll) and llama-app (OUTPUT_NAME llama, producing
llama.exe) write to CMAKE_RUNTIME_OUTPUT_DIRECTORY (bin/<Config>) with
the default linker PDB name llama.pdb. When llama.exe links after
llama.dll, MSVC link.exe updates llama.pdb in place (bumping its PDB
age from 1 to 2 and overwriting llama.dll's DBI/symbol streams), which
breaks symbol loading when debugging llama.dll.

Set PDB_NAME ${TARGET} on llama-app so llama.exe emits llama-app.pdb
while llama.dll keeps llama.pdb.

Additional information

Refs #23296

Validation on Windows x64 (VS 2022, MSVC 19.40):

  • cmake -S . -B build-pdb-check -G "Visual Studio 17 2022" -A x64 -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_EXAMPLES=OFF -DLLAMA_OPENSSL=OFF (passed)
  • cmake --build build-pdb-check --config Debug --target llama llama-app -j (passed)
  • dumpbin /headers on llama.dll and llama.exe confirmed distinct RSDS GUIDs at age 1 (llama.pdb and llama-app.pdb), and llama.exe --version passed.

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES - used GitHub Copilot to inspect the PDB collision and update app/CMakeLists.txt (please review and edit in your own words before submitting)

Assisted-by: GitHub Copilot

Website:

Attestations:

macOS/iOS:

Linux:

Android:

Windows:

openEuler:

  • DISABLED
  • openEuler x86 (310p)
  • openEuler x86 (910b, ACL Graph)
  • openEuler aarch64 (310p)
  • openEuler aarch64 (910b, ACL Graph)

UI: