ObjFileCache is a /tmp/nocc/obj/obj-cache directory, where the resulting .o files are saved. Its purpose is to reuse a ready .o file if the same .cpp is requested to be compiled again. This is especially useful to share .o files across build agents: if one build agent compiles the master branch, oth
| 16 | // The hardest problem is how to detect that "this .cpp was already compiled, we can use .o". |
| 17 | // See ObjFileCache.MakeObjCacheKey. |
| 18 | type ObjFileCache struct { |
| 19 | *FileCache |
| 20 | |
| 21 | // next to obj-cache, there is a /tmp/nocc/obj/cxx-out directory (session.objOutFile point here) |
| 22 | // after being compiled, files from here are hard linked to obj-cache |
| 23 | objTmpDir string |
| 24 | } |
| 25 | |
| 26 | func MakeObjFileCache(cacheDir string, objTmpDir string, limitBytes int64) (*ObjFileCache, error) { |
| 27 | cache, err := MakeFileCache(cacheDir, limitBytes) |
nothing calls this directly
no outgoing calls
no test coverage detected