diff --git a/.gitignore b/.gitignore index 0f7accbf7..dbb3303e3 100644 --- a/.gitignore +++ b/.gitignore @@ -156,3 +156,6 @@ docs/docs/public/c-reference # NPM **/node_modules/**/* + +# Clangd config +compile_flags.txt diff --git a/Makefile b/Makefile index 137f736d9..5a1413dfc 100644 --- a/Makefile +++ b/Makefile @@ -76,7 +76,7 @@ ifeq ($(os),Darwin) clang_tidy = $(llvm_path)/bin/clang-tidy endif -all: templates prism $(exec) $(lib_name) $(static_lib_name) test wasm +all: templates prism $(exec) $(lib_name) $(static_lib_name) test wasm clangd_config $(exec): $(objects) $(cc) $(objects) $(flags) $(ldflags) $(prism_ldflags) -o $(exec) @@ -122,5 +122,8 @@ lint: tidy: $(clang_tidy) $(project_files) -- $(flags) +clangd_config: + @echo "$(flags) $(test_cflags)" | tr ' ' '\n' | sort -u > compile_flags.txt + wasm: cd wasm && make