editor: clangd and cmake work from a committed vscode workspace
The three files libavr's consumers carry, in the leaf-application shape: nothing vendors this repo, so .clangd names the one build tree an editor should read (build/atmega328p-generated) beside the stand-ins clang needs for GCC's AVR dialect; .vscode/settings.json passes --query-driver and names the toolchain prefix for the window that opens this folder. The libavr pin advances to the editor-audit fixes. One residue stays red and is the documented frontend divergence, not a defect: thermistor.hpp's consteval Beta-equation table folds __builtin_log under GCC, which clang refuses to fold in a constant expression -- the same class as libavr's breathe example and its __builtin_cos. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
34
.vscode/settings.json
vendored
Normal file
34
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
// clangd is the language server; the cpptools engine would parse every file
|
||||
// a second time and disagree, since nothing tells it about a cross
|
||||
// compiler. Which database to read is in .clangd.
|
||||
"C_Cpp.intelliSenseEngine": "disabled",
|
||||
|
||||
// --query-driver lets clangd ask the cross compiler for its own system
|
||||
// includes and target; without it every standard header is missing.
|
||||
"clangd.arguments": [
|
||||
"--query-driver=**avr-g++*",
|
||||
"--header-insertion=never"
|
||||
],
|
||||
|
||||
// The presets are the build interface; the toolchain file inside the
|
||||
// libavr submodule is the one place the compiler is chosen. The submodule
|
||||
// carries no local/toolchain for it to discover, so the prefix is named
|
||||
// here, for the window that opens this folder.
|
||||
"cmake.useCMakePresets": "always",
|
||||
"cmake.environment": {
|
||||
"LIBAVR_TOOLCHAIN": "D:/dev/libavr/local/toolchain/avr-gcc-16.1.0-mingw"
|
||||
},
|
||||
"cmake.configureOnOpen": true,
|
||||
"cmake.options.statusBarVisibility": "compact",
|
||||
|
||||
"files.watcherExclude": {
|
||||
"**/build/**": true,
|
||||
"**/libavr/**": true
|
||||
},
|
||||
|
||||
"files.associations": {
|
||||
".clangd": "yaml",
|
||||
".clang-format": "yaml"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user