Skip to content

Commit 1bae4b7

Browse files
svenvhsys-ce-bb
authored andcommitted
Use clang to generate compile_commands (#2031)
Ensure the code-formatting job uses clang to generate compile_commands.json, to avoid passing GCC-specific flags to clang-format or clang-tidy. Original commit: KhronosGroup/SPIRV-LLVM-Translator@c2ff406
1 parent 353f349 commit 1bae4b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm-spirv/.github/workflows/check-code-style.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ jobs:
7575
if: ${{ steps.gather-list-of-changes.outputs.HAS_CHANGES }}
7676
run: |
7777
mkdir build && cd build
78-
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ${{ github.workspace }}
78+
cmake -DCMAKE_CXX_COMPILER=clang++-${{ env.LLVM_VERSION }} \
79+
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ${{ github.workspace }}
7980
8081
- name: Run clang-format
8182
if: ${{ steps.gather-list-of-changes.outputs.HAS_CHANGES }}

0 commit comments

Comments
 (0)