From 6b20272159a22331531ffa12be0e967bc035b700 Mon Sep 17 00:00:00 2001 From: Romaric Jodin Date: Tue, 16 Dec 2025 18:23:37 +0100 Subject: [PATCH] fix compiler/options_build_optimizations (#2595) We need to define -cl-std when compiling with option not in 1.0. --- test_conformance/compiler/test_build_options.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test_conformance/compiler/test_build_options.cpp b/test_conformance/compiler/test_build_options.cpp index 52cb8eaa..15348e06 100644 --- a/test_conformance/compiler/test_build_options.cpp +++ b/test_conformance/compiler/test_build_options.cpp @@ -14,6 +14,7 @@ // limitations under the License. // #include "testBase.h" +#include "harness/kernelHelpers.h" #include "harness/os_helpers.h" #include "harness/testHarness.h" @@ -101,7 +102,10 @@ REGISTER_TEST(options_build_optimizations) continue; } - const char *option = optimization_option.first; + auto build_options = std::string("-cl-std=CL") + + get_max_OpenCL_C_for_context(context).to_string() + " " + + optimization_option.first; + const char *option = build_options.c_str(); clProgramWrapper program; error = create_single_kernel_helper_create_program( context, &program, 1, options_test_kernel, option); @@ -431,7 +435,10 @@ REGISTER_TEST(options_uniform_work_group_size) { return TEST_SKIPPED_ITSELF; } - const char *options = "-cl-uniform-work-group-size"; + std::string build_options = "-cl-std=CL" + + get_max_OpenCL_C_for_context(context).to_string() + + " -cl-uniform-work-group-size"; + const char *options = build_options.c_str(); clProgramWrapper program; int error = create_single_kernel_helper_create_program( context, &program, 1, options_test_kernel, options);