Skip to content

Commit 541dd3a

Browse files
authored
[NFC][test-e2e][kernel_from_file] Link with libdevice sanitizer (#13246)
To fix test failure in test config that device sanitizer is enabled.
1 parent ce1c9ca commit 541dd3a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sycl/test-e2e/Config/kernel_from_file.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
// As we are doing a separate device compilation here, we need to explicitly
88
// add the device lib instrumentation (itt_compiler_wrapper)
99
// RUN: %clangxx -DSYCL_DISABLE_FALLBACK_ASSERT %cxx_std_optionc++17 -fsycl-device-only -fsycl-use-bitcode -fno-sycl-dead-args-optimization -Xclang -fsycl-int-header=%t.h -c %s -o %t.bc -Xclang -verify-ignore-unexpected=note,warning -Wno-sycl-strict
10-
// >> ---- unbundle compiler wrapper device object
10+
// >> ---- unbundle compiler wrapper and sanitizer device objects
1111
// RUN: clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-itt-compiler-wrappers%obj_ext -output=%t_compiler_wrappers.bc -unbundle
12+
// RUN: %if linux %{ clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-sanitizer%obj_ext -output=%t_sanitizer.bc -unbundle %}
1213
// >> ---- link device code
13-
// RUN: llvm-link -o=%t_app.bc %t.bc %t_compiler_wrappers.bc
14+
// RUN: %if linux %{ llvm-link -o=%t_app.bc %t.bc %t_compiler_wrappers.bc %t_sanitizer.bc %} %else %{ llvm-link -o=%t_app.bc %t.bc %t_compiler_wrappers.bc %}
1415
// >> ---- translate to SPIR-V
1516
// RUN: llvm-spirv -o %t.spv %t_app.bc
1617
// RUN: %clangxx -DSYCL_DISABLE_FALLBACK_ASSERT %cxx_std_optionc++17 %include_option %t.h %s -o %t.out %sycl_options -fno-sycl-dead-args-optimization -Xclang -verify-ignore-unexpected=note,warning

0 commit comments

Comments
 (0)