mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
Set ERROR in retValForCrash in SafetyGuard.call()
- allows to print ocloc command line after crash in compilation Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
8540aaff1c
commit
31a61a16c0
@@ -17,6 +17,7 @@ enum {
|
||||
INVALID_PROGRAM = -44,
|
||||
INVALID_COMMAND_LINE = -5150,
|
||||
INVALID_FILE = -5151,
|
||||
COMPILATION_CRASH = -5152,
|
||||
};
|
||||
|
||||
} // namespace NEO::OclocErrorCode
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/offline_compiler/source/ocloc_error_code.h"
|
||||
#include "shared/offline_compiler/source/offline_compiler.h"
|
||||
#include "shared/offline_compiler/source/offline_linker.h"
|
||||
#include "shared/offline_compiler/source/utilities/linux/safety_guard_linux.h"
|
||||
@@ -14,14 +15,14 @@ using namespace NEO;
|
||||
|
||||
int buildWithSafetyGuard(OfflineCompiler *compiler) {
|
||||
SafetyGuardLinux safetyGuard;
|
||||
int retVal = 0;
|
||||
int retVal = NEO::OclocErrorCode::COMPILATION_CRASH;
|
||||
|
||||
return safetyGuard.call<int, OfflineCompiler, decltype(&OfflineCompiler::build)>(compiler, &OfflineCompiler::build, retVal);
|
||||
}
|
||||
|
||||
int linkWithSafetyGuard(OfflineLinker *linker) {
|
||||
SafetyGuardLinux safetyGuard{};
|
||||
int returnValueOnCrash{-1};
|
||||
int returnValueOnCrash{NEO::OclocErrorCode::COMPILATION_CRASH};
|
||||
|
||||
return safetyGuard.call(linker, &OfflineLinker::execute, returnValueOnCrash);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/offline_compiler/source/ocloc_error_code.h"
|
||||
#include "shared/offline_compiler/source/offline_compiler.h"
|
||||
#include "shared/offline_compiler/source/offline_linker.h"
|
||||
#include "shared/offline_compiler/source/utilities/windows/safety_guard_windows.h"
|
||||
@@ -13,13 +14,13 @@ using namespace NEO;
|
||||
|
||||
int buildWithSafetyGuard(OfflineCompiler *compiler) {
|
||||
SafetyGuardWindows safetyGuard;
|
||||
int retVal = 0;
|
||||
int retVal = NEO::OclocErrorCode::COMPILATION_CRASH;
|
||||
return safetyGuard.call<int, OfflineCompiler, decltype(&OfflineCompiler::build)>(compiler, &OfflineCompiler::build, retVal);
|
||||
}
|
||||
|
||||
int linkWithSafetyGuard(OfflineLinker *linker) {
|
||||
SafetyGuardWindows safetyGuard{};
|
||||
int returnValueOnCrash{-1};
|
||||
int returnValueOnCrash{NEO::OclocErrorCode::COMPILATION_CRASH};
|
||||
|
||||
return safetyGuard.call(linker, &OfflineLinker::execute, returnValueOnCrash);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user