fix(ocloc): disable ocloc output if former ocloc was used

in case of fallback to former ocloc, the former ocloc setups outputs

Related-To: NEO-12273
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2024-08-14 15:06:08 +00:00
committed by Compute-Runtime-Automation
parent ab9afed574
commit 90015a584b
2 changed files with 2 additions and 0 deletions

View File

@@ -58,6 +58,7 @@ int oclocInvoke(unsigned int numArgs, const char *argv[],
auto retValFromFormerOcloc = Commands::invokeFormerOcloc(getOclocFormerLibName(), numArgs, argv, numSources, dataSources, lenSources, nameSources, numInputHeaders, dataInputHeaders, lenInputHeaders, nameInputHeaders, numOutputs, dataOutputs, lenOutputs, nameOutputs);
if (retValFromFormerOcloc) {
retVal = retValFromFormerOcloc.value();
argHelper->dontSetupOutputs();
} else {
argHelper->printf("Couldn't load former ocloc %s\n", getOclocFormerLibName().c_str());
}

View File

@@ -84,6 +84,7 @@ class OclocArgHelper {
MOCKABLE_VIRTUAL std::vector<char> readBinaryFile(const std::string &filename);
MOCKABLE_VIRTUAL std::unique_ptr<char[]> loadDataFromFile(const std::string &filename, size_t &retSize);
void dontSetupOutputs() { hasOutput = false; }
bool outputEnabled() const {
return hasOutput;
}