Build PDB file for Windows

This could help with dumping human-readable backtrace symbols with line
no.

See also #1641.
This commit is contained in:
zyn0217 2023-06-19 23:52:40 +08:00 committed by Younan Zhang
parent 6e7f5968ba
commit 519221ada4
2 changed files with 20 additions and 0 deletions

View File

@ -17,6 +17,9 @@ If you can, provide a minimal chunk of code that shows the problem (either inlin
Please attach the clangd stderr log if you can. (Usually available from the editor) Please attach the clangd stderr log if you can. (Usually available from the editor)
If possible, run with `--log=verbose` - note that the logs will include the contents of open files! If possible, run with `--log=verbose` - note that the logs will include the contents of open files!
If this is a crash, try to put `llvm-symbolizer` on your PATH per the troubleshooting instructions. If this is a crash, try to put `llvm-symbolizer` on your PATH per the troubleshooting instructions.
(If you're using Windows, place the associated PDB file(debug symbols) in the same directory as
clangd.exe and rerun again. For official releases, download symbols from the
[release page](https://github.com/clangd/clangd/releases).)
**System information** **System information**

View File

@ -152,6 +152,7 @@ jobs:
"-DCMAKE_CXX_COMPILER=cl" "-DCMAKE_CXX_COMPILER=cl"
"-DLLVM_ENABLE_ZLIB=OFF" "-DLLVM_ENABLE_ZLIB=OFF"
"-DLLVM_USE_CRT_RELEASE=MT" "-DLLVM_USE_CRT_RELEASE=MT"
"-DLLVM_ENABLE_PDB=ON"
grpc_cmake: >- grpc_cmake: >-
"-DgRPC_MSVC_STATIC_RUNTIME=ON" "-DgRPC_MSVC_STATIC_RUNTIME=ON"
binary_extension: ".exe" binary_extension: ".exe"
@ -301,6 +302,12 @@ jobs:
${{ env.CLANGD_DIR }}/LICENSE.TXT ${{ env.CLANGD_DIR }}/LICENSE.TXT
${{ env.CLANGD_DIR }}/bin/clangd${{ matrix.config.binary_extension }} ${{ env.CLANGD_DIR }}/bin/clangd${{ matrix.config.binary_extension }}
${{ env.CLANGD_DIR }}/lib/clang ${{ env.CLANGD_DIR }}/lib/clang
- name: Archive clangd PDB symbols
if: matrix.config.name == 'windows'
run: >
7z a clangd-pdb.zip
${{ env.CLANGD_DIR }}/LICENSE.TXT
${{ env.CLANGD_DIR }}/bin/clangd.pdb
- name: Archive indexing-tools - name: Archive indexing-tools
run: > run: >
7z a indexing-tools.zip 7z a indexing-tools.zip
@ -318,6 +325,16 @@ jobs:
asset_name: clangd-${{ matrix.config.name }}-${{ env.TAG_NAME }}.zip asset_name: clangd-${{ matrix.config.name }}-${{ env.TAG_NAME }}.zip
asset_path: clangd.zip asset_path: clangd.zip
asset_content_type: application/zip asset_content_type: application/zip
- name: Upload clangd PDB asset
if: matrix.config.name == 'windows'
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_name: clangd-${{ matrix.config.name }}-${{ env.TAG_NAME }}-debug-symbol.zip
asset_path: clangd-pdb.zip
asset_content_type: application/zip
- name: Upload indexing-tools asset - name: Upload indexing-tools asset
uses: actions/upload-release-asset@v1.0.1 uses: actions/upload-release-asset@v1.0.1
env: env: