mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
don't use sanitizer when building ocloc
Change-Id: I910802b95e338414300f1b307444331801f3c87a Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
22ec1d1b22
commit
86b4892388
@@ -503,7 +503,7 @@ else()
|
||||
if(USE_ASAN)
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
set(ASAN_FLAGS " -fsanitize=address -fno-omit-frame-pointer")
|
||||
link_libraries(asan)
|
||||
set(ASAN_LIBS "asan")
|
||||
else()
|
||||
message(STATUS "Address sanitization with clang not yet support")
|
||||
endif()
|
||||
@@ -511,7 +511,7 @@ else()
|
||||
if(USE_TSAN)
|
||||
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
|
||||
set(TSAN_FLAGS " -fsanitize=thread")
|
||||
link_libraries(tsan)
|
||||
set(TSAN_LIBS "tsan")
|
||||
else()
|
||||
message(STATUS "Thread sanitization with gcc is not fully supported")
|
||||
endif()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2018 Intel Corporation
|
||||
# Copyright (C) 2018-2019 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
@@ -100,7 +100,6 @@ endif()
|
||||
target_link_libraries(ocloc elflib)
|
||||
|
||||
set_target_properties(ocloc PROPERTIES FOLDER "offline_compiler")
|
||||
set_property(TARGET ocloc APPEND_STRING PROPERTY COMPILE_FLAGS ${ASAN_FLAGS} ${TSAN_FLAGS})
|
||||
|
||||
add_custom_target(copy_compiler_files DEPENDS ${IGDRCL__IGC_TARGETS})
|
||||
set_target_properties(copy_compiler_files PROPERTIES FOLDER "opencl runtime")
|
||||
|
||||
@@ -26,6 +26,8 @@ if(WIN32)
|
||||
string(REPLACE "/O2" "/Od" CMAKE_C_FLAGS_RELEASEINTERNAL ${CMAKE_C_FLAGS_RELEASEINTERNAL})
|
||||
endif()
|
||||
|
||||
link_libraries(${ASAN_LIBS} ${TSAN_LIBS})
|
||||
|
||||
add_custom_target(unit_tests)
|
||||
add_custom_target(run_unit_tests ALL)
|
||||
|
||||
@@ -465,4 +467,4 @@ if(MSVC)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_ult_pch})
|
||||
endif()
|
||||
|
||||
# Dont add any sources below PCH logic. This is to keep PCH dependencies correctly without creating new target
|
||||
# Dont add any sources below PCH logic. This is to keep PCH dependencies correctly without creating new target
|
||||
|
||||
Reference in New Issue
Block a user