Fixed clangd problems with emscripten.

This commit is contained in:
2026-06-16 23:59:51 +02:00
parent a708ac9628
commit af440fd296
6 changed files with 94 additions and 12 deletions

27
.clangd Normal file
View File

@@ -0,0 +1,27 @@
CompileFlags:
# Add Emscripten include paths
Add:
- "-isystem"
- "/mnt/douwe/hdd/Projects/Screeps/emsdk/upstream/emscripten/system/include"
- "-isystem"
- "/mnt/douwe/hdd/Projects/Screeps/emsdk/upstream/emscripten/system/lib"
- "-isystem"
- "/mnt/douwe/hdd/Projects/Screeps/emsdk/upstream/emscripten/cache/sysroot/include"
- "-D__EMSCRIPTEN__"
- "-D__EMSCRIPTEN_PTHREADS__"
- "-I/mnt/douwe/hdd/Projects/Screeps/screepsxx/include" # Path to Screeps headers
# Remove ALL Emscripten-specific flags
Remove:
- "-s.*" # Removes ALL -s* flags (e.g., -sSTRICT=0, -sMODULARIZE=1)
- "--no-entry"
- "--bind"
- "--cache"
- "-sEXPORT_ES6=.*"
- "-sEXPORTED_RUNTIME_METHODS=.*"
- "-sASSERTIONS=.*"
- "-sMALLOC=.*"
- "-sEXPORTED_FUNCTIONS=.*"
# Suppress diagnostics for unused includes and unknown arguments
Diagnostics:
UnusedIncludes: None