ccache.py 403 B

1234567891011121314
  1. def exists():
  2. return True
  3. def generate(env):
  4. if ccache := env.WhereIs("ccache"):
  5. env["CCACHE"] = "ccache"
  6. env["CC_NOCACHE"] = env["CC"]
  7. env["CC"] = "$CCACHE $CC_NOCACHE"
  8. # Tricky place: linking is done with CXX
  9. # Using ccache breaks it
  10. env["LINK"] = env["CXX"]
  11. env["CXX_NOCACHE"] = env["CXX"]
  12. env["CXX"] = "$CCACHE $CXX_NOCACHE"