MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / CompilationInfo_init

Function CompilationInfo_init

Tools/ToolsBootstrap.c:746–761  ·  view source on GitHub ↗

CompilationInfo functions

Source from the content-addressed store, hash-verified

744 return toolH;
745}
746
747char* buildToolExecutablePath(const CompilationInfo* ci) {
748 char* exeDir = Path_join(ci->toolOutputDir, ci->targetOS ? ci->targetOS : "Unknown");
749 char* exeName = "SC-";
750 exeName = (char*)malloc(strlen(exeName) + strlen(ci->args->toolName) + 1);
751 if (exeName) {
752 strcpy(exeName, "SC-");
753 strcat(exeName, ci->args->toolName);
754 char* exeExt = "";
755#ifdef _WIN32
756 exeExt = ".exe";
757#endif
758 exeName = (char*)realloc(exeName, strlen(exeName) + strlen(exeExt) + 1);
759 if (exeName) strcat(exeName, exeExt);
760 }
761
762 char* toolExe = exeName ? Path_join(exeDir, exeName) : NULL;
763 free(exeName);
764 free(exeDir);

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected