CompilationInfo functions
| 744 | return toolH; |
| 745 | } |
| 746 | |
| 747 | char* 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); |