Skip to content

Commit 07b6361

Browse files
committed
restructure
1 parent 27ab422 commit 07b6361

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ SYCL::getDeviceLibraries(const Compilation &C, const llvm::Triple &TargetTriple,
342342
{"libsycl-itt-stubs", "internal"}};
343343
#if !defined(_WIN32)
344344
const SYCLDeviceLibsList SYCLDeviceSanitizerLibs = {
345-
{"libsycl-sanitizer", "internal"}};
345+
{"libsycl-asan", "internal"}};
346346
#endif
347347

348348
const SYCLDeviceLibsList SYCLNativeCpuDeviceLibs = {

clang/test/Driver/sycl-device-lib-old-model.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@
196196
// SYCL_LLVM_LINK_USER_ONLY_NEEDED: llvm-link{{.*}} "-only-needed" "{{.*}}" "-o" "{{.*}}.bc" "--suppress-warnings"
197197

198198
/// ###########################################################################
199-
/// test behavior of libsycl-sanitizer.o linking when -fsanitize=address is available
199+
/// test behavior of libsycl-asan.o linking when -fsanitize=address is available
200200
// RUN: %clangxx -fsycl --no-offload-new-driver %s --sysroot=%S/Inputs/SYCL -fsanitize=address -### 2>&1 \
201201
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_SANITIZER
202202
// RUN: %clangxx -fsycl --no-offload-new-driver %s --sysroot=%S/Inputs/SYCL -Xsycl-target-frontend -fsanitize=address -### 2>&1 \
@@ -226,8 +226,8 @@
226226
// SYCL_DEVICE_LIB_SANITIZER-SAME: "{{.*}}libsycl-fallback-imf.bc"
227227
// SYCL_DEVICE_LIB_SANITIZER-SAME: "{{.*}}libsycl-fallback-imf-fp64.bc"
228228
// SYCL_DEVICE_LIB_SANITIZER-SAME: "{{.*}}libsycl-fallback-imf-bf16.bc"
229-
// SYCL_DEVICE_LIB_SANITIZER-SAME: "{{.*}}libsycl-sanitizer.bc"
229+
// SYCL_DEVICE_LIB_SANITIZER-SAME: "{{.*}}libsycl-asan.bc"
230230
// SYCL_DEVICE_ASAN_MACRO: "-cc1"
231231
// SYCL_DEVICE_ASAN_MACRO-SAME: "USE_SYCL_DEVICE_ASAN"
232232
// SYCL_DEVICE_ASAN_MACRO: llvm-link{{.*}} "-only-needed"
233-
// SYCL_DEVICE_ASAN_MACRO-SAME: "{{.*}}libsycl-sanitizer.bc"
233+
// SYCL_DEVICE_ASAN_MACRO-SAME: "{{.*}}libsycl-asan.bc"

clang/test/Driver/sycl-device-lib.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
// SYCL_NO_DEVICE_LIB_INVALID_VALUE: error: unsupported argument '[[Val]]' to option '-fno-sycl-device-lib='
154154

155155
/// ###########################################################################
156-
/// test behavior of libsycl-sanitizer.o linking when -fsanitize=address is available
156+
/// test behavior of libsycl-asan.o linking when -fsanitize=address is available
157157
// RUN: %clangxx -fsycl --offload-new-driver %s --sysroot=%S/Inputs/SYCL -fsanitize=address -### 2>&1 \
158158
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_SANITIZER
159159
// RUN: %clangxx -fsycl --offload-new-driver %s --sysroot=%S/Inputs/SYCL -Xsycl-target-frontend -fsanitize=address -### 2>&1 \
@@ -184,7 +184,7 @@
184184
// SYCL_DEVICE_LIB_SANITIZER-SAME: {{.*}}libsycl-fallback-imf.new.o
185185
// SYCL_DEVICE_LIB_SANITIZER-SAME: {{.*}}libsycl-fallback-imf-fp64.new.o
186186
// SYCL_DEVICE_LIB_SANITIZER-SAME: {{.*}}libsycl-fallback-imf-bf16.new.o
187-
// SYCL_DEVICE_LIB_SANITIZER-SAME: {{.*}}libsycl-sanitizer.new.o
187+
// SYCL_DEVICE_LIB_SANITIZER-SAME: {{.*}}libsycl-asan.new.o
188188
// SYCL_DEVICE_ASAN_MACRO: "-cc1"
189189
// SYCL_DEVICE_ASAN_MACRO-SAME: "USE_SYCL_DEVICE_ASAN"
190-
// SYCL_DEVICE_ASAN_MACRO: libsycl-sanitizer.new.o
190+
// SYCL_DEVICE_ASAN_MACRO: libsycl-asan.new.o

libdevice/cmake/modules/SYCLLibdevice.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ if (NOT MSVC)
204204
set(sanitizer_obj_deps
205205
device.h atomic.hpp spirv_vars.h
206206
include/asan_libdevice.hpp
207-
include/sanitizer_utils.hpp
207+
include/asan_rtl.hpp
208208
include/spir_global_var.hpp
209209
sycl-compiler)
210210
endif()
@@ -268,8 +268,8 @@ if(MSVC)
268268
SRC msvc_math.cpp
269269
DEPENDENCIES ${cmath_obj_deps})
270270
else()
271-
add_devicelibs(libsycl-sanitizer
272-
SRC sanitizer_utils.cpp
271+
add_devicelibs(libsycl-asan
272+
SRC sanitizer/asan_rtl.cpp
273273
DEPENDENCIES ${sanitizer_obj_deps}
274274
EXTRA_OPTS -fno-sycl-instrument-device-code)
275275
endif()
File renamed without changes.

libdevice/sanitizer_utils.cpp renamed to libdevice/sanitizer/asan_rtl.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "atomic.hpp"
10-
#include "device.h"
11-
#include "spirv_vars.h"
9+
#include "../atomic.hpp"
10+
#include "../device.h"
11+
#include "../spirv_vars.h"
1212

13-
#include "include/asan_libdevice.hpp"
14-
#include "include/sanitizer_utils.hpp"
13+
#include "../include/asan_libdevice.hpp"
14+
#include "../include/asan_rtl.hpp"
1515

1616
using uptr = uintptr_t;
1717
using s8 = char;

sycl/test-e2e/Config/kernel_from_file.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
// RUN: %clangxx -Wno-error=ignored-attributes -DSYCL_DISABLE_FALLBACK_ASSERT %cxx_std_optionc++17 -fsycl-device-only -fno-sycl-dead-args-optimization -Xclang -fsycl-int-header=%t.h %s -o %t.bc -Xclang -verify-ignore-unexpected=note,warning -Wno-sycl-strict
1010
// >> ---- 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 %}
12+
// RUN: %if linux %{ clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-asan%obj_ext -output=%t_asan.bc -unbundle %}
1313
// >> ---- link device code
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 %}
14+
// RUN: %if linux %{ llvm-link -o=%t_app.bc %t.bc %t_compiler_wrappers.bc %t_asan.bc %} %else %{ llvm-link -o=%t_app.bc %t.bc %t_compiler_wrappers.bc %}
1515
// >> ---- translate to SPIR-V
1616
// RUN: llvm-spirv -o %t.spv %t_app.bc
1717
// RUN: %clangxx -Wno-error=ignored-attributes -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)