| 421 | |
| 422 | unsigned long long hash = String_hashFnv1a(args->projectDir ? args->projectDir : args->libraryDir); |
| 423 | hash = String_hashCombine(hash, args->buildDir); |
| 424 | hash = String_hashCombine(hash, args->toolName); |
| 425 | hash = String_hashCombine(hash, toolCpp); |
| 426 | |
| 427 | char hashDirectory[32]; |
| 428 | snprintf(hashDirectory, sizeof(hashDirectory), "%016llx", hash); |
| 429 | |
| 430 | char* scBuildDir = Path_join(cacheBase, "SC-build"); |
| 431 | char* toolCache = Path_join(scBuildDir, "ToolCache"); |
| 432 | char* outputDir = Path_join(toolCache, hashDirectory); |
| 433 | free(scBuildDir); |
| 434 | free(toolCache); |
| 435 | return outputDir; |
| 436 | } |
| 437 | #endif |
| 438 | |
| 439 | FileSystemContext FileSystem_init(void) { |
| 440 | FileSystemContext ctx; |
| 441 | ctx.path = Path_init(); |
| 442 | return ctx; |
| 443 | } |
| 444 | |
| 445 | // StringBuilder utilities |
| 446 | StringBuilder StringBuilder_init(size_t initial_capacity) { |
no outgoing calls
no test coverage detected