mirror of
https://github.com/clangd/clangd.git
synced 2025-07-18 05:30:13 +00:00
Compare commits
21 Commits
snapshot_2
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
30a8f963f7 | ||
|
8f26871294 | ||
|
1e95a5944b | ||
|
439b0626d1 | ||
|
cb1cfd5a92 | ||
|
8ea4a27f46 | ||
|
0a7499759d | ||
|
909659b1ba | ||
|
cb870db274 | ||
|
ff6fd49148 | ||
|
d5998e7fce | ||
|
6e7f5968ba | ||
|
a729875fb1 | ||
|
1a90fba271 | ||
|
f707dfdeab | ||
|
ebce136114 | ||
|
64ccc9d3ec | ||
|
19a7bfdb2d | ||
|
9d058532be | ||
|
ca00967a89 | ||
|
1a5759b2da |
3
.github/ISSUE_TEMPLATE/bug_report.md
vendored
3
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -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**
|
||||||
|
|
||||||
|
4
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
4
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
contact_links:
|
||||||
|
- name: Questions and discussions
|
||||||
|
url: https://github.com/clangd/clangd/discussions
|
||||||
|
about: Usage questions, ideas and proposals
|
80
.github/workflows/autobuild.yaml
vendored
80
.github/workflows/autobuild.yaml
vendored
@ -5,6 +5,8 @@
|
|||||||
# Because the build takes more than an hour, our GITHUB_TOKEN credentials may
|
# Because the build takes more than an hour, our GITHUB_TOKEN credentials may
|
||||||
# expire. A token `secrets.RELEASE_TOKEN` must exist with public_repo scope.
|
# expire. A token `secrets.RELEASE_TOKEN` must exist with public_repo scope.
|
||||||
name: Build release binaries
|
name: Build release binaries
|
||||||
|
env:
|
||||||
|
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||||
on:
|
on:
|
||||||
# Run weekly on sunday at 21:37 UTC (arbitrary)
|
# Run weekly on sunday at 21:37 UTC (arbitrary)
|
||||||
schedule:
|
schedule:
|
||||||
@ -68,7 +70,7 @@ jobs:
|
|||||||
run: >
|
run: >
|
||||||
echo "RELEASE_DESCRIPTION=Unstable snapshot of clangd on ${{ env.RELEASE_DATE }}." >> commit.env
|
echo "RELEASE_DESCRIPTION=Unstable snapshot of clangd on ${{ env.RELEASE_DATE }}." >> commit.env
|
||||||
- name: Upload result
|
- name: Upload result
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: env
|
name: env
|
||||||
path: commit.env
|
path: commit.env
|
||||||
@ -85,7 +87,7 @@ jobs:
|
|||||||
echo "RELEASE_NAME=${{ github.event.inputs.release_name }}" >> commit.env
|
echo "RELEASE_NAME=${{ github.event.inputs.release_name }}" >> commit.env
|
||||||
echo "RELEASE_DESCRIPTION=${{ github.event.inputs.description }}" >> commit.env
|
echo "RELEASE_DESCRIPTION=${{ github.event.inputs.description }}" >> commit.env
|
||||||
- name: Upload result
|
- name: Upload result
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: env
|
name: env
|
||||||
path: commit.env
|
path: commit.env
|
||||||
@ -99,10 +101,12 @@ jobs:
|
|||||||
if: always() && (needs.schedule_environment.result == 'success' || needs.workflow_dispatch_environment.result == 'success')
|
if: always() && (needs.schedule_environment.result == 'success' || needs.workflow_dispatch_environment.result == 'success')
|
||||||
steps:
|
steps:
|
||||||
- name: Fetch environment variables
|
- name: Fetch environment variables
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name:
|
name:
|
||||||
env
|
env
|
||||||
|
path:
|
||||||
|
env
|
||||||
- name: Set environment variables
|
- name: Set environment variables
|
||||||
run: |
|
run: |
|
||||||
cat env/commit.env >> $GITHUB_ENV
|
cat env/commit.env >> $GITHUB_ENV
|
||||||
@ -126,7 +130,7 @@ jobs:
|
|||||||
echo "TAG_NAME=${{ env.TAG_NAME }}" >> release.env
|
echo "TAG_NAME=${{ env.TAG_NAME }}" >> release.env
|
||||||
echo "RELEASE_ID=${{ steps.create_release.outputs.id }}" >> release.env
|
echo "RELEASE_ID=${{ steps.create_release.outputs.id }}" >> release.env
|
||||||
- name: Upload result
|
- name: Upload result
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: release
|
name: release
|
||||||
path: release.env
|
path: release.env
|
||||||
@ -138,44 +142,54 @@ jobs:
|
|||||||
name: Build ${{ matrix.config.name }}
|
name: Build ${{ matrix.config.name }}
|
||||||
needs: create_release
|
needs: create_release
|
||||||
if: always() && needs.create_release.result == 'success'
|
if: always() && needs.create_release.result == 'success'
|
||||||
runs-on: ${{ matrix.config.os }}
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- name: windows
|
- name: windows
|
||||||
os: windows-latest
|
os: windows-2022
|
||||||
preinstall: choco install ninja nasm
|
preinstall: choco install ninja nasm
|
||||||
vcvars: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
|
vcvars: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat
|
||||||
cflags: /O2 /DNDEBUG
|
cflags: /O2 /DNDEBUG
|
||||||
cmake: >-
|
cmake: >-
|
||||||
"-DCMAKE_C_COMPILER=cl"
|
"-DCMAKE_C_COMPILER=cl"
|
||||||
"-DCMAKE_CXX_COMPILER=cl"
|
"-DCMAKE_CXX_COMPILER=cl"
|
||||||
"-DLLVM_ENABLE_ZLIB=OFF"
|
"-DLLVM_ENABLE_ZLIB=OFF"
|
||||||
"-DLLVM_USE_CRT_RELEASE=MT"
|
"-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded"
|
||||||
|
"-DLLVM_ENABLE_PDB=ON"
|
||||||
|
"-DLLVM_PARALLEL_LINK_JOBS=1"
|
||||||
grpc_cmake: >-
|
grpc_cmake: >-
|
||||||
"-DgRPC_MSVC_STATIC_RUNTIME=ON"
|
"-DgRPC_MSVC_STATIC_RUNTIME=ON"
|
||||||
binary_extension: ".exe"
|
binary_extension: ".exe"
|
||||||
- name: mac
|
- name: mac
|
||||||
os: macos-latest
|
os: macos-13
|
||||||
preinstall: brew install ninja zlib p7zip
|
preinstall: brew install ninja zlib p7zip
|
||||||
cflags: -O3 -gline-tables-only -DNDEBUG
|
cflags: -O3 -gline-tables-only -DNDEBUG
|
||||||
env: MACOSX_DEPLOYMENT_TARGET=10.9
|
|
||||||
cmake: >-
|
cmake: >-
|
||||||
"-DCMAKE_C_COMPILER=clang"
|
"-DCMAKE_C_COMPILER=clang"
|
||||||
"-DCMAKE_CXX_COMPILER=clang++"
|
"-DCMAKE_CXX_COMPILER=clang++"
|
||||||
"-DLLVM_ENABLE_ZLIB=FORCE_ON"
|
"-DLLVM_ENABLE_ZLIB=FORCE_ON"
|
||||||
"-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64"
|
"-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64"
|
||||||
|
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13"
|
||||||
# BoringSSL doesn't support universal binaries when building with ASM.
|
# BoringSSL doesn't support universal binaries when building with ASM.
|
||||||
grpc_cmake: >-
|
grpc_cmake: >-
|
||||||
"-DOPENSSL_NO_ASM=ON"
|
"-DOPENSSL_NO_ASM=ON"
|
||||||
- name: linux
|
- name: linux
|
||||||
os: ubuntu-18.04
|
os: ubuntu-latest
|
||||||
preinstall: sudo apt-get install ninja-build libz-dev libc-ares-dev
|
container: ubuntu:20.04
|
||||||
|
preinstall: >-
|
||||||
|
apt-get update &&
|
||||||
|
apt-get install -y ninja-build libz-dev libc-ares-dev wget clang-10
|
||||||
|
software-properties-common p7zip-full curl &&
|
||||||
|
add-apt-repository ppa:git-core/ppa &&
|
||||||
|
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add - &&
|
||||||
|
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' &&
|
||||||
|
apt-get update &&
|
||||||
|
apt-get install -y git cmake python3.8 python3.8-dev
|
||||||
cflags: -O3 -gline-tables-only -DNDEBUG -include $GITHUB_WORKSPACE/.github/workflows/lib_compat.h
|
cflags: -O3 -gline-tables-only -DNDEBUG -include $GITHUB_WORKSPACE/.github/workflows/lib_compat.h
|
||||||
cmake: >-
|
cmake: >-
|
||||||
"-DCMAKE_C_COMPILER=clang"
|
"-DCMAKE_C_COMPILER=clang-10"
|
||||||
"-DCMAKE_CXX_COMPILER=clang++"
|
"-DCMAKE_CXX_COMPILER=clang++-10"
|
||||||
"-DCMAKE_EXE_LINKER_FLAGS_RELEASE=-static-libgcc -Wl,--compress-debug-sections=zlib"
|
"-DCMAKE_EXE_LINKER_FLAGS_RELEASE=-static-libgcc -Wl,--compress-debug-sections=zlib"
|
||||||
"-DLLVM_STATIC_LINK_CXX_STDLIB=ON"
|
"-DLLVM_STATIC_LINK_CXX_STDLIB=ON"
|
||||||
"-DLLVM_ENABLE_ZLIB=FORCE_ON"
|
"-DLLVM_ENABLE_ZLIB=FORCE_ON"
|
||||||
@ -184,6 +198,8 @@ jobs:
|
|||||||
# libraries. All other gRPC dependencies can be built from sources.
|
# libraries. All other gRPC dependencies can be built from sources.
|
||||||
grpc_cmake: >-
|
grpc_cmake: >-
|
||||||
"-DgRPC_CARES_PROVIDER=package"
|
"-DgRPC_CARES_PROVIDER=package"
|
||||||
|
runs-on: ${{ matrix.config.os }}
|
||||||
|
container: ${{ matrix.config.container }}
|
||||||
steps:
|
steps:
|
||||||
- name: Clone scripts
|
- name: Clone scripts
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
@ -229,15 +245,19 @@ jobs:
|
|||||||
|
|
||||||
ninja -C grpc-build install
|
ninja -C grpc-build install
|
||||||
- name: Fetch target commit
|
- name: Fetch target commit
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name:
|
name:
|
||||||
env
|
env
|
||||||
|
path:
|
||||||
|
env
|
||||||
- name: Fetch release info
|
- name: Fetch release info
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name:
|
name:
|
||||||
release
|
release
|
||||||
|
path:
|
||||||
|
release
|
||||||
- name: Put release info into env
|
- name: Put release info into env
|
||||||
run: |
|
run: |
|
||||||
cat env/commit.env >> $GITHUB_ENV
|
cat env/commit.env >> $GITHUB_ENV
|
||||||
@ -263,7 +283,7 @@ jobs:
|
|||||||
cp llvm-project/llvm/LICENSE.TXT ${{ env.CLANGD_DIR }}
|
cp llvm-project/llvm/LICENSE.TXT ${{ env.CLANGD_DIR }}
|
||||||
|
|
||||||
cmake -G Ninja -S llvm-project/llvm -B ${{ env.CLANGD_DIR }}
|
cmake -G Ninja -S llvm-project/llvm -B ${{ env.CLANGD_DIR }}
|
||||||
"-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra"
|
"-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra;openmp"
|
||||||
"-DLLVM_ENABLE_ASSERTIONS=OFF"
|
"-DLLVM_ENABLE_ASSERTIONS=OFF"
|
||||||
"-DLLVM_ENABLE_BACKTRACES=ON"
|
"-DLLVM_ENABLE_BACKTRACES=ON"
|
||||||
"-DLLVM_ENABLE_TERMINFO=OFF"
|
"-DLLVM_ENABLE_TERMINFO=OFF"
|
||||||
@ -273,18 +293,30 @@ jobs:
|
|||||||
"-DCMAKE_C_FLAGS_RELEASE=${{ matrix.config.cflags }}"
|
"-DCMAKE_C_FLAGS_RELEASE=${{ matrix.config.cflags }}"
|
||||||
"-DCMAKE_CXX_FLAGS_RELEASE=${{ matrix.config.cflags }}"
|
"-DCMAKE_CXX_FLAGS_RELEASE=${{ matrix.config.cflags }}"
|
||||||
"-DCLANGD_ENABLE_REMOTE=ON"
|
"-DCLANGD_ENABLE_REMOTE=ON"
|
||||||
|
"-DLLVM_ENABLE_ZSTD=OFF"
|
||||||
"-DGRPC_INSTALL_PATH=$HOME/grpc-installation"
|
"-DGRPC_INSTALL_PATH=$HOME/grpc-installation"
|
||||||
${{ matrix.config.cmake }}
|
${{ matrix.config.cmake }}
|
||||||
- name: Ninja
|
- name: Ninja
|
||||||
run: >
|
run: >
|
||||||
ninja -C ${{ env.CLANGD_DIR }} clangd clangd-indexer clangd-index-server
|
ninja -C ${{ env.CLANGD_DIR }} clangd clangd-indexer clangd-index-server
|
||||||
clangd-index-server-monitor
|
clangd-index-server-monitor
|
||||||
|
- name: Install OpenMP headers
|
||||||
|
shell: bash
|
||||||
|
run: >
|
||||||
|
cp ${{ env.CLANGD_DIR }}/projects/openmp/runtime/src/omp{,-tools}.h ${{ env.CLANGD_DIR }}/lib/clang/*/include
|
||||||
|
|| true # Don't let the non-existing omp headers block the release.
|
||||||
- name: Archive clangd
|
- name: Archive clangd
|
||||||
run: >
|
run: >
|
||||||
7z a clangd.zip
|
7z a clangd.zip
|
||||||
${{ 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.7z -t7z -m0=LZMA2
|
||||||
|
${{ 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
|
||||||
@ -302,6 +334,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-debug-symbols-${{ matrix.config.name }}-${{ env.TAG_NAME }}.7z
|
||||||
|
asset_path: clangd-pdb.7z
|
||||||
|
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:
|
||||||
@ -321,10 +363,12 @@ jobs:
|
|||||||
if: always() && needs.build.result == 'success'
|
if: always() && needs.build.result == 'success'
|
||||||
steps:
|
steps:
|
||||||
- name: Fetch release info
|
- name: Fetch release info
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name:
|
name:
|
||||||
release
|
release
|
||||||
|
path:
|
||||||
|
release
|
||||||
- name: Update the env variables
|
- name: Update the env variables
|
||||||
run: >
|
run: >
|
||||||
cat release/release.env >> $GITHUB_ENV
|
cat release/release.env >> $GITHUB_ENV
|
||||||
|
1
.github/workflows/lib_compat.h
vendored
1
.github/workflows/lib_compat.h
vendored
@ -16,5 +16,6 @@ FORCE_SYMBOL_VERSION(expf, GLIBC_2.2.5);
|
|||||||
FORCE_SYMBOL_VERSION(log, GLIBC_2.2.5);
|
FORCE_SYMBOL_VERSION(log, GLIBC_2.2.5);
|
||||||
FORCE_SYMBOL_VERSION(log2, GLIBC_2.2.5);
|
FORCE_SYMBOL_VERSION(log2, GLIBC_2.2.5);
|
||||||
FORCE_SYMBOL_VERSION(pow, GLIBC_2.2.5);
|
FORCE_SYMBOL_VERSION(pow, GLIBC_2.2.5);
|
||||||
|
FORCE_SYMBOL_VERSION(exp, GLIBC_2.2.5);
|
||||||
|
|
||||||
#undef FORCE_SYMBOL_VERSION
|
#undef FORCE_SYMBOL_VERSION
|
||||||
|
Loading…
Reference in New Issue
Block a user