Skip to content

Commit

Permalink
Build PDB file for Windows
Browse files Browse the repository at this point in the history
This could help with dumping human-readable backtrace symbols with line
no.

See also clangd#1641.
  • Loading branch information
zyn0217 committed Jun 20, 2023
1 parent 6e7f596 commit 519221a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
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 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**

Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/autobuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ jobs:
"-DCMAKE_CXX_COMPILER=cl"
"-DLLVM_ENABLE_ZLIB=OFF"
"-DLLVM_USE_CRT_RELEASE=MT"
"-DLLVM_ENABLE_PDB=ON"
grpc_cmake: >-
"-DgRPC_MSVC_STATIC_RUNTIME=ON"
binary_extension: ".exe"
Expand Down Expand Up @@ -301,6 +302,12 @@ jobs:
${{ env.CLANGD_DIR }}/LICENSE.TXT
${{ env.CLANGD_DIR }}/bin/clangd${{ matrix.config.binary_extension }}
${{ 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
run: >
7z a indexing-tools.zip
Expand All @@ -318,6 +325,16 @@ jobs:
asset_name: clangd-${{ matrix.config.name }}-${{ env.TAG_NAME }}.zip
asset_path: clangd.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
uses: actions/upload-release-asset@v1.0.1
env:
Expand Down

0 comments on commit 519221a

Please sign in to comment.