Skip to content

Commit f26923e

Browse files
committed
Update cmake and fix typo
Add compile time macro and also fix typos in ur_lib.hpp.
1 parent bd793ef commit f26923e

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,18 @@ else()
206206
endif()
207207
endif()
208208

209+
if(UR_ENABLE_EXCEPTION_SANITIZER)
210+
if(APPLE)
211+
message(WARNING "Exception sanitizer layer isn't supported on macOS")
212+
set(UR_ENABLE_EXCEPTION_SANITIZER OFF)
213+
elseif(WIN32)
214+
message(WARNING "Exception sanitizer layer isn't supported on Windows")
215+
set(UR_ENABLE_EXCEPTION_SANITIZER OFF)
216+
else()
217+
add_compile_definitions(UR_ENABLE_EXCEPTION_SANITIZER)
218+
endif()
219+
endif()
220+
209221
if(UR_USE_ASAN)
210222
add_sanitizer_flag(address)
211223
endif()

source/loader/ur_lib.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "sanitizer/ur_sanitizer_layer.hpp"
2828
#endif
2929
#if UR_ENABLE_EXCEPTION_SANITIZER
30-
#include "exception-sanitizer/ur_exception_sanitizer_layer.hpp"
30+
#include "exception_sanitizer/ur_exception_sanitizer_layer.hpp"
3131
#endif
3232

3333
#include <atomic>
@@ -89,7 +89,7 @@ class __urdlllocal context_t : public AtomicSingleton<context_t> {
8989
#endif
9090
#if UR_ENABLE_EXCEPTION_SANITIZER
9191
{ur_exception_sanitizer_layer::getContext(),
92-
ur_exception_sanitizer_layer::forceDelete},
92+
ur_exception_sanitizer_layer::context_t::forceDelete},
9393
#endif
9494
};
9595

0 commit comments

Comments
 (0)