You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is my conclusion after spending days trying to figure out what’s going on. Based on the output of gcc -E -v, I found that the header paths are duplicated and redirected through multiple levels of relative paths. The output on other GCC versions is much clearer.
I previously thought clangd was buggy and that I needed to manually specify --sysroot and -isystem for CMake to include them in compile_commands.json, since it doesn’t do so by default. However, the output of gcc -E -v puzzled me. Later I discovered that Premake5 does include -isystem in the compile_commands.json it generates. I quickly wrote a premake5.lua and tested it. Even when I made everything as conformant as possible, clangd still complained that the path in compile_commands.json was invalid, which validated my earlier speculation.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
This is my conclusion after spending days trying to figure out what’s going on. Based on the output of
gcc -E -v, I found that the header paths are duplicated and redirected through multiple levels of relative paths. The output on other GCC versions is much clearer.I previously thought
clangdwas buggy and that I needed to manually specify--sysrootand-isystemfor CMake to include them incompile_commands.json, since it doesn’t do so by default. However, the output ofgcc -E -vpuzzled me. Later I discovered that Premake5 does include-isystemin thecompile_commands.jsonit generates. I quickly wrote apremake5.luaand tested it. Even when I made everything as conformant as possible,clangdstill complained that the path incompile_commands.jsonwas invalid, which validated my earlier speculation.All reactions