Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor C API #273

Merged
merged 117 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
46053d9
refactor!: rename some functions in the C API
edubart Jul 16, 2024
2eaca04
refactor!: removed some iflags functions from the C API
edubart Aug 26, 2024
a2e8c93
refactor!: remove many read/write CSR functions from the C API
edubart Aug 26, 2024
b527beb
refactor!: add tohost/fromhost views of CSR fields
edubart Aug 27, 2024
9167969
refactor!: add iflags view CSR fields
edubart Aug 27, 2024
9f1fd3e
refactor!: remove unused error enums
edubart Sep 7, 2024
7126385
refactor!: split tohost/fromhost data field into reason/data
edubart Sep 7, 2024
10dd7eb
refactor!: remove cm_packed_iflags C API
edubart Sep 7, 2024
a586065
refactor!: refactor error messages to use cm_get_last_error_message()
edubart Sep 7, 2024
d8a5716
refactor!: rework cm_replace_memory_range API arguments
edubart Sep 7, 2024
e1beea3
refactor!: rename some function arguments in the C API
edubart Sep 7, 2024
fecec39
refactor!: return pid in jsonrpc remote machine fork
edubart Sep 8, 2024
ddecb42
refactor!: return new address in jsonrpc rebind
edubart Sep 8, 2024
832aaa2
refactor!: use JSON for machine configs in the C API
edubart Sep 8, 2024
522f05a
refactor!: remove read/write APIs for x and f registers
edubart Sep 9, 2024
83940a0
refactor!: change jsonrpc get version method to return a JSON string
edubart Sep 9, 2024
6d3cfd8
refactor!: remove write mcycle/uarch_cycle methods from the C API
edubart Sep 9, 2024
eef1093
refactor!: use JSON strings for cm_get_memory_ranges C API
edubart Sep 10, 2024
501b862
feat: expose base64 encode/decode functions in Lua
edubart Sep 10, 2024
c8385bf
refactor!: use JSON strings for cm_get_proof C API
edubart Sep 10, 2024
a2a616e
refactor: remove NOLINT comments from C API headers
edubart Sep 10, 2024
f5550c5
feat: expose JSON encode/decode functions in Lua
edubart Sep 10, 2024
91d8741
feat!: make --store-config use a JSON instead of a Lua table
edubart Sep 10, 2024
3ee5b5b
refactor: use string dynamic storage in the C API
edubart Sep 11, 2024
38228ac
refactor!: remove unused error enums
edubart Sep 11, 2024
d2a93ce
refactor!: combine verify log and state transitions functions
edubart Sep 11, 2024
b263310
refactor!: use JSON for serializing access logs
edubart Sep 17, 2024
f3dea1a
refactor!: rename C API delete methods
edubart Sep 18, 2024
3f1c975
refactor: cleanup C API headers
edubart Sep 18, 2024
4310393
refactor: rework Lua JSON functions
edubart Sep 19, 2024
bf8acc0
refactor: let Lua manage allocated references of JSON functions
edubart Sep 20, 2024
34ac6cc
feat: add support for VirtIO configs in JSON configs
edubart Sep 24, 2024
0b5f9c9
refactor: use fixed size integers for length in the C API
edubart Sep 25, 2024
f683203
refactor!: use lowercase for all types in C API
edubart Sep 25, 2024
8d5023d
feat!: add cm_receive_cmio_request to the C API
edubart Sep 26, 2024
2b26bd8
refactor: trim read/write CSR methods implementation in C API
edubart Sep 26, 2024
f71c26d
refactor!: expose cmio yield reasons in the C API
edubart Sep 26, 2024
b836906
refactor: expose relevant PMA ranges in the C API
edubart Sep 27, 2024
c300bd8
feat: allow adding new methods in Lua machine objects (for prototyping)
edubart Sep 27, 2024
feb09e9
feat: add store/load JSON config command line options
edubart Sep 26, 2024
06a0064
refactor: move GDB documentation to wiki
edubart Sep 27, 2024
403fd54
fix: add missing schemas to jsonrpc discover
edubart Sep 27, 2024
923532e
refactor: remove unnecessary pushes from Lua bindings
edubart Sep 28, 2024
502d995
refactor!: remove one_based parameter from all log functions
edubart Sep 28, 2024
83278fd
feat: translate Lua tables to/from JSON objects using a schema
edubart Sep 29, 2024
80b18d2
feat: auto detect flash drive start address, include bootargs in defa…
edubart Sep 29, 2024
2a06f6f
refactor!: use negative values for errors in the C API
edubart Sep 30, 2024
e126205
refactor: polish C API documentation
edubart Oct 3, 2024
9de486a
refactor!: rename CSR to REG in C API
edubart Oct 3, 2024
14ee258
refactor!: combine cm_destroy and cm_delete methods
edubart Oct 4, 2024
9c3216a
refactor!: return cm_error enumeration in C API functions
edubart Oct 4, 2024
7b3e35a
refactor!: make proofs mandatory in access logs
edubart Oct 4, 2024
f1a66d8
refactor: remove specialized register accessors from machine class
edubart Oct 4, 2024
c678a16
refactor: set output values even on C API function failure
edubart Oct 7, 2024
c6a52ed
refactor!: return cm_error for cm_get_default_config/cm_get_reg_address
edubart Oct 8, 2024
e66a9fa
refactor: share the same TLS string across the C API to save memory
edubart Oct 8, 2024
4a3040d
refactor!: disable Sv57 address translation and remove no4lvl bootarg
edubart Oct 8, 2024
ededd97
feat(!): add new options to remote machine server
diegonehab Oct 8, 2024
3a3b69a
refactor(!): jsonrpc_mgr -> jsonrpc_connection
diegonehab Oct 8, 2024
0058980
chore: format code
diegonehab Oct 8, 2024
1ddda4c
refactor(!): update jsonrpc C-api
diegonehab Oct 8, 2024
ceca9f7
refactor(!): add new jsonrpc client code
diegonehab Oct 9, 2024
e70ec80
chore: make lint passes
diegonehab Oct 11, 2024
f5a1b1c
chore: format
diegonehab Oct 14, 2024
e67d3dc
feat(!): use double-fork instead of fork
diegonehab Oct 14, 2024
0c72686
refactor: revamp destroy/shutdown/delete etc
diegonehab Oct 14, 2024
3038193
chore: format lua
diegonehab Oct 15, 2024
c123628
chore: remove machine specifier to some api names
diegonehab Oct 15, 2024
f78ce81
fix: fix some lint errors and test compile errors
edubart Oct 15, 2024
09053b4
refactor: ignore new lint warnings in new clang-tidy
edubart Oct 15, 2024
629a498
refactor: fix readability-redundant-casting lint errors
edubart Oct 15, 2024
166ac83
refactor: fix bugprone-casting-through-void lint errors
edubart Oct 15, 2024
eec994f
refactor: fix bugprone-unused-return-value lint errors
edubart Oct 15, 2024
d1902a9
refactor: fix cppcoreguidelines-use-default-member-init lint errors
edubart Oct 15, 2024
0ebc18d
refactor: fix google-explicit-constructor lint errors
edubart Oct 15, 2024
7d2a64f
refactor: fix google-runtime-int lint errors
edubart Oct 15, 2024
54eef38
refactor: fix modernize-redundant-void-arg lint errors
edubart Oct 15, 2024
ed6770b
refactor: fix readability-redundant-member-init lint errors
edubart Oct 15, 2024
23bd8ca
refactor: fix readability-avoid-return-with-void-value lint errors
edubart Oct 15, 2024
95817da
refactor: fix readability-redundant-inline-specifier lint errors
edubart Oct 15, 2024
bc0d12d
refactor: fix readability-duplicate-include lint errors
edubart Oct 15, 2024
3cdeaf9
refactor: fix readability-avoid-nested-conditional-operator lint errors
edubart Oct 15, 2024
e9dce85
refactor: fix readability-static-accessed-through-instance lint errors
edubart Oct 15, 2024
c43c393
refactor: fix readability-named-parameter lint errors
edubart Oct 15, 2024
ccb63a9
refactor: remove some unneeded NOLINTs
edubart Oct 15, 2024
8aeda1b
chore: bump clang-tidy/clang-format to v18
edubart Oct 16, 2024
5ea8697
refactor: add warnings flags and fix warnings in uarch sources
edubart Oct 16, 2024
8a19b68
refactor: add linter for uarch sources
edubart Oct 16, 2024
c971972
refactor: fix lua check
edubart Oct 16, 2024
3a4fc4d
refactor: fix performance-move-const-arg lint errors
edubart Oct 16, 2024
e3e192a
refactor: fix bugprone-assignment-in-if-condition lint errors
edubart Oct 16, 2024
007f3e8
refactor: fix modernize-use-auto lint errors
edubart Oct 16, 2024
b35d1cc
refactor: fix readability-implicit-bool-conversion lint errors
edubart Oct 16, 2024
04bab77
refactor: include hicpp lint checks
edubart Oct 16, 2024
af7db70
refactor: fix modernize-use-constraints lint errors
edubart Oct 16, 2024
ec40d60
refactor: fix cppcoreguidelines-macro-to-enum lint errors
edubart Oct 16, 2024
d003604
refactor: fix readability-else-after-return lint errors
edubart Oct 16, 2024
ea0c7ee
fix: fix --assert-rolling-template
edubart Oct 17, 2024
a60c09f
refactor: fix cppcoreguidelines-non-private-member-variables-in-class…
edubart Oct 17, 2024
cbc8631
refactor: fix bugprone-branch-clone lint errors
edubart Oct 17, 2024
6889836
refactor: discard unused variables using std::ignore
edubart Oct 17, 2024
8740c8b
refactor: fix hicpp-multiway-paths-covered lint errors
edubart Oct 17, 2024
fdb9bd4
refactor: fix hicpp-no-malloc lint errors
edubart Oct 17, 2024
2ae6e75
refactor: fix uarch headers lint errors
edubart Oct 17, 2024
ec29ecc
refactor: fix missing includes in headers
edubart Oct 17, 2024
e76a0d4
refactor: fix missing includes in sources
edubart Oct 17, 2024
ca702b7
fix: fix regression in --cmio-advance-state option
edubart Oct 18, 2024
f42897a
refactor(!): simplify local/remote machine APIs
diegonehab Dec 2, 2024
e7c5d78
fix: make format and lint green again
edubart Dec 3, 2024
47700cc
chore: mention about the requirement of C++20 to compile
edubart Dec 3, 2024
08d18c8
fix: rework jsonrpc client using async operations to support timeouts
edubart Dec 4, 2024
8bf75ac
feat: add more tests
diegonehab Dec 5, 2024
2c6d44b
fix: destroy io_service in shutdown_sever to avoid accumulating sockets
edubart Dec 8, 2024
353ca2c
feat: spawn server in localhost when omitting its argument
edubart Dec 8, 2024
8bd3b0d
feat: introduce the new --remote-spawn command line option
edubart Dec 8, 2024
15fbd0d
fix: fix compile errors for Windows and WASM targets
edubart Dec 7, 2024
b7b4427
refactor: make jsonrpc remote server quieter by default
edubart Dec 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ ConstructorInitializerAllOnOneLineOrOnePerLine: true
IndentCaseLabels: true
IndentWidth: 4
SpaceAfterCStyleCast: true
Standard: c++17
Standard: c++20
30 changes: 15 additions & 15 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
Checks: >-
boost*,
bugprone*,
-bugprone-branch-clone,
-bugprone-easily-swappable-parameters,
cert*,
clang-analyzer*,
-clang-analyzer-optin.cplusplus.VirtualCall,
cppcoreguidelines*,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-pro-bounds*,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-avoid-c-arrays,
google-readability-*,
google*,
-google-build-using-namespace,
hicpp*,
-hicpp-avoid-c-arrays,
-hicpp-no-array-decay,
-hicpp-signed-bitwise,
-hicpp-vararg,
misc*,
-misc-no-recursion,
-misc-non-private-member-variables-in-classes,
-misc-use-anonymous-namespace,
-misc-include-cleaner,
modernize*,
-modernize-redundant-void-arg,
-modernize-use-default-member-init,
-modernize-use-nodiscard,
-modernize-use-trailing-return-type,
-modernize-avoid-c-arrays,
-modernize-use-auto,
performance*,
-performance-enum-size,
portability*,
readability*,
-readability-else-after-return,
-readability-function-cognitive-complexity,
-readability-implicit-bool-conversion,
-readability-identifier-length,
-readability-magic-numbers,
-readability-named-parameter,
-readability-redundant-member-init
WarningsAsErrors: >-
boost*,
bugprone*,
cert*,
clang-analyzer*,
cppcoreguidelines*,
google*,
hicpp*,
misc*,
modernize*,
performance*,
portability*,
readability*
CheckOptions:
- key: performance-move-const-arg.CheckTriviallyCopyableMove
value: 'false'
readability*,
18 changes: 12 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,26 @@ ARG SANITIZE=no

RUN apt-get update && \
DEBIAN_FRONTEND="noninteractive" apt-get install --no-install-recommends -y \
build-essential vim wget git clang-tidy-16 clang-format-16 lcov \
build-essential vim wget git lcov \
libboost1.81-dev libssl-dev libslirp-dev \
ca-certificates pkg-config lua5.4 liblua5.4-dev \
luarocks xxd procps && \
update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-16 120 && \
update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-16 120 && \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/* /var/cache/apt/*

RUN apt-get update && \
DEBIAN_FRONTEND="noninteractive" apt-get install --no-install-recommends -y wget software-properties-common gnupg && \
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc && \
add-apt-repository -y 'deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-18 main' && \
add-apt-repository -y 'deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-18 main' && \
apt-get update && \
apt-get install --no-install-recommends -y clang-tidy-18 clang-format-18 && \
update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-18 120 && \
update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-18 120 && \
rm -rf /var/lib/apt/lists/* /var/cache/apt/*

RUN luarocks install --lua-version=5.4 luasocket && \
luarocks install --lua-version=5.4 luasec && \
luarocks install --lua-version=5.4 luaposix && \
luarocks install --lua-version=5.4 lpeg && \
luarocks install --lua-version=5.4 dkjson && \
luarocks install --lua-version=5.4 luacheck && \
cargo install [email protected] --features lua54

Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ EMU_LUA_TO_BIN= src/cartesi-machine.lua src/cartesi-machine-stored-hash.lua
EMU_TO_LUA_PATH= src/cartesi/util.lua src/cartesi/proof.lua src/cartesi/gdbstub.lua
EMU_TO_LUA_CPATH= src/cartesi.so
EMU_TO_LUA_CARTESI_CPATH= src/cartesi/jsonrpc.so
EMU_TO_INC= $(addprefix src/,jsonrpc-machine-c-api.h machine-c-api.h \
machine-c-defines.h machine-c-version.h pma-defines.h rtc-defines.h htif-defines.h uarch-defines.h)
EMU_TO_INC= $(addprefix src/,jsonrpc-machine-c-api.h machine-c-api.h machine-c-version.h)
UARCH_TO_SHARE= uarch-ram.bin

TESTS_TO_BIN= tests/build/misc/test-merkle-tree-hash tests/build/misc/test-machine-c-api
Expand Down
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Cleaning targets:

### Requirements

- C++ Compiler with support for C++17 (tested with GCC >= 8+ and Clang >= 8.x).
- C++ Compiler with support for C++20 (tested with GCC >= 8+ and Clang >= 8.x).
- GNU Make >= 3.81
- Lua >= 5.4.4
- Libslirp >= 4.6.0
Expand All @@ -54,8 +54,6 @@ sudo apt-get install build-essential wget git clang-tidy-16 clang-format-16 \
ca-certificates pkg-config lua5.4 liblua5.4-dev \
luarocks

sudo luarocks install --lua-version=5.4 lpeg
sudo luarocks install --lua-version=5.4 dkjson
sudo luarocks install --lua-version=5.4 luasocket
sudo luarocks install --lua-version=5.4 luasec
sudo luarocks install --lua-version=5.4 luaposix
Expand All @@ -70,8 +68,6 @@ For more information, see the [Configuring Lua 5.4](#configuring-lua-54) section
```bash
sudo port install clang-16 boost181 wget pkgconfig lua54 lua-luarocks libslirp

sudo luarocks install --lua-version=5.4 lpeg
sudo luarocks install --lua-version=5.4 dkjson
sudo luarocks install --lua-version=5.4 luasocket
sudo luarocks install --lua-version=5.4 luasec
sudo luarocks install --lua-version=5.4 luaposix
Expand All @@ -84,8 +80,6 @@ For more information, see the [Configuring Lua 5.4](#configuring-lua-54) section
```bash
brew install llvm@16 boost wget pkg-config openssl lua luarocks libslirp

luarocks --lua-dir=$(brew --prefix)/opt/lua install lpeg
luarocks --lua-dir=$(brew --prefix)/opt/lua install dkjson
luarocks --lua-dir=$(brew --prefix)/opt/lua install luasocket
luarocks --lua-dir=$(brew --prefix)/opt/lua install luasec
luarocks --lua-dir=$(brew --prefix)/opt/lua install luaposix
Expand Down
2 changes: 0 additions & 2 deletions src/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
*.pb.h
*.pb.cc
*.ext2
*.bin
*.gcno
Expand Down
28 changes: 18 additions & 10 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ LIBCARTESI_JSONRPC=libcartesi_jsonrpc-$(EMULATOR_VERSION_MAJOR).$(EMULATOR_VERSI
ifeq ($(slirp),yes)
# Workaround for building with macports lua-luarocks installation
machine.o: INCS+=$(SLIRP_INC)
machine.clang-tidy: INCS+=$(SLIRP_INC)
virtio-net-carrier-slirp.o: INCS+=$(SLIRP_INC)
virtio-net-carrier-slirp.clang-tidy: INCS+=$(SLIRP_INC)
#INCS+=$(SLIRP_INC)
LIBCARTESI_COMMON_LIBS+=$(SLIRP_LIB)
else
Expand All @@ -149,7 +151,7 @@ HASH_LIBS=

#DEFS+= -DMT_ALL_DIRTY

WARNS=-Wall -Wpedantic
WARNS=-Wall -Wextra -Wpedantic

# Place our include directories before the system's
INCS+= \
Expand All @@ -162,6 +164,12 @@ INCS+= \
# Use 64-bit offsets for file operations in POSIX APIs
DEFS+=-D_FILE_OFFSET_BITS=64

# Disable json filesystem to support more compilers
DEFS+=-DJSON_HAS_FILESYSTEM=0

# Disable ASIO threads and use asio select() backend to avoid potential issues fork()
DEFS+=-DBOOST_ASIO_DISABLE_THREADS -DBOOST_ASIO_DISABLE_EPOLL -DBOOST_ASIO_DISABLE_EVENTFD

ifeq ($(dump),yes)
#DEFS+=-DDUMP_ILLEGAL_INSN_EXCEPTIONS
#DEFS+=-DDUMP_EXCEPTIONS
Expand All @@ -187,10 +195,13 @@ INTERPRET_CXXFLAGS+=-DNDEBUG # disable asserts only for interpret.cpp
else ifeq ($(release),yes)
OPTFLAGS+=-O2
DEFS+=-DNDEBUG # disable all asserts
DEFS+=-DBOOST_ASIO_DISABLE_ERROR_LOCATION # remove line/function location from error messages
else ifeq ($(debug),yes)
OPTFLAGS+=-Og -g
OPTFLAGS+=-Og -g -fno-omit-frame-pointer
OPTFLAGS+=-D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -fstack-clash-protection -fstack-protector-strong
else ifeq ($(sanitize),yes)
OPTFLAGS+=-O1 -g
OPTFLAGS+=-O1 -g -fno-omit-frame-pointer
OPTFLAGS+=-D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -fstack-clash-protection -fstack-protector-strong
endif

# Git commit hash (for releases)
Expand Down Expand Up @@ -281,7 +292,7 @@ else
DEFS+=-DNO_THREADS
endif

CXXFLAGS+=$(OPTFLAGS) -std=gnu++17 -fvisibility=hidden -MMD $(PICCFLAGS) $(CC_MARCH) $(INCS) $(GCFLAGS) $(UBFLAGS) $(DEFS) $(WARNS)
CXXFLAGS+=$(OPTFLAGS) -std=gnu++20 -fvisibility=hidden -MMD $(PICCFLAGS) $(CC_MARCH) $(INCS) $(GCFLAGS) $(UBFLAGS) $(DEFS) $(WARNS)
CFLAGS+=$(OPTFLAGS) -std=gnu99 -fvisibility=hidden -MMD $(PICCFLAGS) $(CC_MARCH) $(INCS) $(GCFLAGS) $(UBFLAGS) $(DEFS) $(WARNS)
LDFLAGS+=$(UBFLAGS)

Expand Down Expand Up @@ -368,15 +379,12 @@ LIBCARTESI_OBJS:= \
CARTESI_CLUA_OBJS:= \
clua.o \
clua-i-virtual-machine.o \
clua-htif.o \
clua-machine-util.o \
uarch-pristine-ram.o \
uarch-pristine-state-hash.o \
uarch-pristine-hash.o

LUACARTESI_OBJS:= \
clua-cartesi.o \
clua-machine.o \
$(CARTESI_CLUA_OBJS)

LIBCARTESI_MERKLE_TREE_OBJS:= \
Expand All @@ -392,14 +400,14 @@ MERKLE_TREE_HASH_OBJS:= \

LIBCARTESI_JSONRPC_OBJS:= \
jsonrpc-virtual-machine.o \
os.o \
jsonrpc-machine-c-api.o \
uarch-pristine-ram.o \
uarch-pristine-state-hash.o \
uarch-pristine-hash.o

LUACARTESI_JSONRPC_OBJS:= \
clua-cartesi-jsonrpc.o \
clua-jsonrpc-machine.o \
$(CARTESI_CLUA_OBJS)

JSONRPC_REMOTE_CARTESI_MACHINE_OBJS:= \
Expand Down Expand Up @@ -533,12 +541,12 @@ jsonrpc-discover.cpp: jsonrpc-discover.json
echo '} // namespace cartesi' >> jsonrpc-discover.cpp

%.clang-tidy: %.cpp machine-c-version.h
@$(CLANG_TIDY) --header-filter='$(CLANG_TIDY_HEADER_FILTER)' $< -- $(CXXFLAGS) $(LUA_INC) 2>/dev/null
@$(CLANG_TIDY) --header-filter='$(CLANG_TIDY_HEADER_FILTER)' $(CLANG_TIDY_FLAGS) $< -- $(CXXFLAGS) $(LUA_INC) 2>/dev/null
@$(CXX) $(CXXFLAGS) $(LUA_INC) $< -MM -MT $@ -MF [email protected] > /dev/null 2>&1
@touch $@

%.clang-tidy: %.c
@$(CLANG_TIDY) --header-filter='$(CLANG_TIDY_HEADER_FILTER)' $< -- $(CFLAGS) 2>/dev/null
@$(CLANG_TIDY) --header-filter='$(CLANG_TIDY_HEADER_FILTER)' $(CLANG_TIDY_FLAGS) $< -- $(CFLAGS) 2>/dev/null
@$(CC) $(CFLAGS) $< -MM -MT $@ -MF [email protected] > /dev/null 2>&1
@touch $@

Expand Down
Loading
Loading