Improve error handling in offline linker

Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This commit is contained in:
Patryk Wrobel
2022-12-21 11:12:36 +00:00
committed by Compute-Runtime-Automation
parent 429755e0f4
commit 59a4017cb6
4 changed files with 40 additions and 1 deletions

View File

@@ -413,6 +413,13 @@ void translate(bool usingIgc, CIF::Builtins::BufferSimple *src, CIF::Builtins::B
}
}
if (debugVars.forceSuccessWithEmptyOutput) {
if (out) {
out->setOutput(nullptr, 0);
}
return;
}
if ((debugVars.forceBuildFailure == false) &&
(out && src && src->GetMemoryRaw() && src->GetSizeRaw())) {

View File

@@ -28,6 +28,7 @@ struct MockCompilerDebugVars {
bool shouldReturnInvalidTranslationOutput = false;
bool shouldFailCreationOfTranslationContext = false;
bool forceBuildFailure = false;
bool forceSuccessWithEmptyOutput = false;
bool forceCreateFailure = false;
bool forceRegisterFail = false;
bool internalOptionsExpected = false;