@@ -248,46 +248,46 @@ if (NOT MSVC AND UR_SANITIZER_INCLUDE_DIR)
248
248
-I${UR_SANITIZER_INCLUDE_DIR}
249
249
-I${CMAKE_CURRENT_SOURCE_DIR} )
250
250
251
- set (asan_pvc_compile_opts_obj -fsycl -c
251
+ set (sanitizer_pvc_compile_opts_obj -fsycl -c
252
252
${sanitizer_generic_compile_opts}
253
253
${sycl_pvc_target_opt}
254
254
-D__LIBDEVICE_PVC__)
255
255
256
- set (asan_cpu_compile_opts_obj -fsycl -c
256
+ set (sanitizer_cpu_compile_opts_obj -fsycl -c
257
257
${sanitizer_generic_compile_opts}
258
258
${sycl_cpu_target_opt}
259
259
-D__LIBDEVICE_CPU__)
260
260
261
- set (asan_dg2_compile_opts_obj -fsycl -c
261
+ set (sanitizer_dg2_compile_opts_obj -fsycl -c
262
262
${sanitizer_generic_compile_opts}
263
263
${sycl_dg2_target_opt}
264
264
-D__LIBDEVICE_DG2__)
265
265
266
- set (asan_pvc_compile_opts_bc ${bc_device_compile_opts}
266
+ set (sanitizer_pvc_compile_opts_bc ${bc_device_compile_opts}
267
267
${sanitizer_generic_compile_opts}
268
268
-D__LIBDEVICE_PVC__)
269
269
270
- set (asan_cpu_compile_opts_bc ${bc_device_compile_opts}
270
+ set (sanitizer_cpu_compile_opts_bc ${bc_device_compile_opts}
271
271
${sanitizer_generic_compile_opts}
272
272
-D__LIBDEVICE_CPU__)
273
273
274
- set (asan_dg2_compile_opts_bc ${bc_device_compile_opts}
274
+ set (sanitizer_dg2_compile_opts_bc ${bc_device_compile_opts}
275
275
${sanitizer_generic_compile_opts}
276
276
-D__LIBDEVICE_DG2__)
277
277
278
- set (asan_pvc_compile_opts_obj -new-offload -fsycl -c --offload-new-driver
278
+ set (sanitizer_pvc_compile_opts_obj -new-offload -fsycl -c --offload-new-driver
279
279
-foffload-lto=thin
280
280
${sanitizer_generic_compile_opts}
281
281
${sycl_pvc_target_opt}
282
282
-D__LIBDEVICE_PVC__)
283
283
284
- set (asan_cpu_compile_opts_obj -new-offload -fsycl -c --offload-new-driver
284
+ set (sanitizer_cpu_compile_opts_obj -new-offload -fsycl -c --offload-new-driver
285
285
-foffload-lto=thin
286
286
${sanitizer_generic_compile_opts}
287
287
${sycl_cpu_target_opt}
288
288
-D__LIBDEVICE_CPU__)
289
289
290
- set (asan_dg2_compile_opts_obj -new-offload -fsycl -c --offload-new-driver
290
+ set (sanitizer_dg2_compile_opts_obj -new-offload -fsycl -c --offload-new-driver
291
291
-foffload-lto=thin
292
292
${sanitizer_generic_compile_opts}
293
293
${sycl_dg2_target_opt}
@@ -373,16 +373,16 @@ else()
373
373
-I${CMAKE_CURRENT_SOURCE_DIR} )
374
374
375
375
# asan aot
376
- set (asan_filetypes obj obj-new-offload bc)
376
+ set (sanitizer_filetypes obj obj-new-offload bc)
377
377
set (asan_devicetypes pvc cpu dg2)
378
378
379
- foreach (asan_ft IN LISTS asan_filetypes )
379
+ foreach (asan_ft IN LISTS sanitizer_filetypes )
380
380
foreach (asan_device IN LISTS asan_devicetypes)
381
381
compile_lib_ext(libsycl-asan-${asan_device}
382
382
SRC sanitizer/asan_rtl.cpp
383
383
FILETYPE ${asan_ft}
384
384
DEPENDENCIES ${asan_obj_deps}
385
- OPTS ${asan_ ${asan_device} _compile_opts_${asan_ft} })
385
+ OPTS ${sanitizer_ ${asan_device} _compile_opts_${asan_ft} })
386
386
endforeach ()
387
387
endforeach ()
388
388
@@ -393,6 +393,19 @@ else()
393
393
EXTRA_OPTS -fno-sycl-instrument-device-code
394
394
-I${UR_SANITIZER_INCLUDE_DIR}
395
395
-I${CMAKE_CURRENT_SOURCE_DIR} )
396
+
397
+ set (msan_devicetypes pvc cpu)
398
+
399
+ foreach (msan_ft IN LISTS sanitizer_filetypes)
400
+ foreach (msan_device IN LISTS msan_devicetypes)
401
+ compile_lib_ext(libsycl-msan-${msan_device}
402
+ SRC sanitizer/msan_rtl.cpp
403
+ FILETYPE ${msan_ft}
404
+ DEPENDENCIES ${msan_obj_deps}
405
+ OPTS ${sanitizer_${msan_device} _compile_opts_${msan_ft} })
406
+ endforeach ()
407
+ endforeach ()
408
+
396
409
endif ()
397
410
endif ()
398
411
0 commit comments