use specific clang-format

This commit is contained in:
SimonFJ20 2026-03-20 14:00:16 +01:00
parent 0ca8f5cae1
commit e5e07de4a1
2 changed files with 7 additions and 6 deletions

View File

@ -20,12 +20,12 @@ jobs:
sudo ./llvm.sh 22
- name: versions
run: |
gcc --version
clang-format --version
clang-22 --version
clang-format-22 --version
- name: check
working-directory: ./backend
run: make check
run: make check CLANG_FORMAT=clang-format-22
- name: build
working-directory: ./backend
run: make all
run: make all CC=clang-22 LD=clang-22

View File

@ -3,6 +3,7 @@ MAKEFLAGS += -j16
CC=gcc
LD=gcc
CLANG_FORMAT=clang-format
CFLAGS = -std=c23 -pedantic-errors -Wall -Wextra -Wconversion
LDFLAGS =
@ -45,10 +46,10 @@ $(obj_dir)/%.o: %.c
$(CC) $< -c -o $@ -MMD -MP $(CFLAGS)
format:
clang-format -style=file -i src/*
$(CLANG_FORMAT) -style=file -i src/*
check:
clang-format --dry-run --Werror -style=file src/*
$(CLANG_FORMAT) --dry-run --Werror -style=file src/*
clean:
rm -rf $(build_dir)