ocloc fatbinary - check if OfflineCompiler was created successfully

Change-Id: Ie24403ca25ea81eba38061edbeeed60dabd17f57
This commit is contained in:
chmielew
2020-03-23 12:57:24 +01:00
committed by sys_ocldev
parent 37b7d1ebd6
commit 93c8ffe326

View File

@ -250,6 +250,10 @@ int buildFatbinary(int argc, const char *argv[], OclocArgHelper *helper) {
int retVal = 0;
argsCopy[deviceArgIndex] = targetPlatform.str();
std::unique_ptr<OfflineCompiler> pCompiler{OfflineCompiler::create(argc, argsCopy, false, retVal, helper)};
if (ErrorCode::SUCCESS != retVal) {
printf("Error! Couldn't create OfflineCompiler. Exiting.\n");
return retVal;
}
auto stepping = pCompiler->getHardwareInfo().platform.usRevId;
if (retVal == 0) {
retVal = buildWithSafetyGuard(pCompiler.get());