summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/state_trackers/clover/api/program.cpp2
-rw-r--r--src/gallium/state_trackers/clover/llvm/invocation.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/clover/api/program.cpp b/src/gallium/state_trackers/clover/api/program.cpp
index 3a6c0546153..60184ed10b8 100644
--- a/src/gallium/state_trackers/clover/api/program.cpp
+++ b/src/gallium/state_trackers/clover/api/program.cpp
@@ -182,6 +182,8 @@ clBuildProgram(cl_program d_prog, cl_uint num_devs,
prog.build(devs, opts);
return CL_SUCCESS;
} catch (error &e) {
+ if (e.get() == CL_INVALID_COMPILER_OPTIONS)
+ return CL_INVALID_BUILD_OPTIONS;
if (e.get() == CL_COMPILE_PROGRAM_FAILURE)
return CL_BUILD_PROGRAM_FAILURE;
return e.get();
diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index e9538224bf6..cda447d565d 100644
--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -177,7 +177,7 @@ namespace {
opts_carray.data() + opts_carray.size(),
Diags);
if (!Success) {
- throw error(CL_INVALID_BUILD_OPTIONS);
+ throw error(CL_INVALID_COMPILER_OPTIONS);
}
c.getFrontendOpts().ProgramAction = clang::frontend::EmitLLVMOnly;
c.getHeaderSearchOpts().UseBuiltinIncludes = true;