Skip to content

Commit

Permalink
Use clang to generate compile_commands (#2031)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
svenvh authored and sys-ce-bb committed Jun 1, 2023
1 parent 353f349 commit 1bae4b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llvm-spirv/.github/workflows/check-code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ jobs:
if: ${{ steps.gather-list-of-changes.outputs.HAS_CHANGES }}
run: |
mkdir build && cd build
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ${{ github.workspace }}
cmake -DCMAKE_CXX_COMPILER=clang++-${{ env.LLVM_VERSION }} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" ${{ github.workspace }}
- name: Run clang-format
if: ${{ steps.gather-list-of-changes.outputs.HAS_CHANGES }}
Expand Down

0 comments on commit 1bae4b7

Please sign in to comment.