unleashed-firmware/scripts/fbt_tools/ccache.py
hedger c93d164785
fbt, vscode: tweaks for cdb generation for clangd (#3680)
* fbt, vscode: tweaks for cdb generation for clangd
* .clangd: updated config
* vscode: disabled auto header insertion for clangd
* .clangd: updated config, ignoring format warnings
* Add sublime text project
* vscode: enabled clang-tidy for clangd
* clangd: strict include checks for sources only

Co-authored-by: あく <alleteam@gmail.com>
2024-06-01 13:20:51 +01:00

15 lines
458 B
Python

def exists():
return True
def generate(env):
if env.WhereIs("ccache"):
env["CCACHE"] = "ccache"
env["CC_NOCACHE"] = env["CC"]
env["CC"] = "$CCACHE $CC_NOCACHE"
# Tricky place: linking is done with CXX
# Using ccache breaks it
env["LINK"] = env["CXX"]
env["CXX_NOCACHE"] = env["CXX"]
env["CXX"] = "$CCACHE $CXX_NOCACHE"
env.AppendUnique(COMPILATIONDB_OMIT_BINARIES=["ccache"])