diff options
| author | Akshay Nair <phenax5@gmail.com> | 2026-02-01 20:59:22 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2026-02-01 20:59:24 +0530 |
| commit | 8fa32bb0414c3164d8c3467c5db4c1a912627fc4 (patch) | |
| tree | 0d1c3b5f1aa27f77b4678b6f65f38b8b09dfce37 /setup_compiledb.sh | |
| parent | 7224fce49e4fa8c0b966dcc8d4f9b1d12b02f66a (diff) | |
| download | daft-watch-8fa32bb0414c3164d8c3467c5db4c1a912627fc4.tar.gz daft-watch-8fa32bb0414c3164d8c3467c5db4c1a912627fc4.zip | |
Remove platformio stuff and switch to avr-gcc
Diffstat (limited to 'setup_compiledb.sh')
| -rwxr-xr-x | setup_compiledb.sh | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/setup_compiledb.sh b/setup_compiledb.sh deleted file mode 100755 index 9233bb1..0000000 --- a/setup_compiledb.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash - -export COMPILATIONDB_INCLUDE_TOOLCHAIN=true - -# Compile the project -pio run -t compiledb - -# Clean up existing define files -rm -f _compiler_defines.h compiler_defines.h clang_defines.h - -# Generate defines for clang -gcc -dM -xc++ /dev/null -c -v -E 2>/dev/null | sed "s/\([^[:space:]]\+[[:space:]]\+[^[:space:]]\+\)\(.*\)/\1/;s/#define/#undef/" >clang_defines.h - -# Iterate through compile_commands.json and extract compiler defines -for comp in $(cat compile_commands.json | grep -E "\"command\": \"[^[:space:]]* -o" | sed 's:"command"\: "::g; s:-o.*::g' | sort | uniq); do - set -x - $comp -dM -E -xc++ /dev/null >>_compiler_defines.h - set +x -done - -# Combine defines from clang and extracted defines -cat clang_defines.h > compiler_defines.h -cat _compiler_defines.h | sort | uniq >> compiler_defines.h - -# Clean up temporary define files -rm -f _compiler_defines.h clang_defines.h - -# Update compile_commands.json with additional include flags -sed -i "s:.cpp\",:.cpp -include $${PWD}/compiler_defines.h\",:" compile_commands.json -sed -i "s:.c\",:.c -include $${PWD}/compiler_defines.h\",:" compile_commands.json |
