summaryrefslogtreecommitdiff
path: root/lib/scudo
diff options
context:
space:
mode:
Diffstat (limited to 'lib/scudo')
-rw-r--r--lib/scudo/CMakeLists.txt57
1 files changed, 34 insertions, 23 deletions
diff --git a/lib/scudo/CMakeLists.txt b/lib/scudo/CMakeLists.txt
index 0d6314680..4d26a3477 100644
--- a/lib/scudo/CMakeLists.txt
+++ b/lib/scudo/CMakeLists.txt
@@ -12,12 +12,14 @@ set(SCUDO_SOURCES
scudo_flags.cpp
scudo_crc32.cpp
scudo_interceptors.cpp
- scudo_new_delete.cpp
scudo_termination.cpp
scudo_tsd_exclusive.cpp
scudo_tsd_shared.cpp
scudo_utils.cpp)
+set(SCUDO_CXX_SOURCES
+ scudo_new_delete.cpp)
+
# Enable the SSE 4.2 instruction set for scudo_crc32.cpp, if available.
if (COMPILER_RT_HAS_MSSE4_2_FLAG)
set_source_files_properties(scudo_crc32.cpp PROPERTIES COMPILE_FLAGS -msse4.2)
@@ -36,26 +38,35 @@ if(COMPILER_RT_HAS_SCUDO)
append_list_if(COMPILER_RT_HAS_LIBPTHREAD pthread SCUDO_DYNAMIC_LIBS)
append_list_if(COMPILER_RT_HAS_LIBLOG log SCUDO_DYNAMIC_LIBS)
- foreach(arch ${SCUDO_SUPPORTED_ARCH})
- add_compiler_rt_runtime(clang_rt.scudo
- STATIC
- ARCHS ${arch}
- SOURCES ${SCUDO_SOURCES}
- OBJECT_LIBS RTSanitizerCommonNoTermination
- RTSanitizerCommonLibc
- RTInterception
- CFLAGS ${SCUDO_CFLAGS}
- PARENT_TARGET scudo)
-
- add_compiler_rt_runtime(clang_rt.scudo
- SHARED
- ARCHS ${arch}
- SOURCES ${SCUDO_SOURCES}
- OBJECT_LIBS RTSanitizerCommonNoTermination
- RTSanitizerCommonLibc
- RTInterception
- CFLAGS ${SCUDO_CFLAGS}
- LINK_LIBS ${SCUDO_DYNAMIC_LIBS}
- PARENT_TARGET scudo)
- endforeach()
+ add_compiler_rt_runtime(clang_rt.scudo
+ STATIC
+ ARCHS ${SCUDO_SUPPORTED_ARCH}
+ SOURCES ${SCUDO_SOURCES}
+ OBJECT_LIBS RTSanitizerCommonNoTermination
+ RTSanitizerCommonLibc
+ RTInterception
+ RTUbsan
+ CFLAGS ${SCUDO_CFLAGS}
+ PARENT_TARGET scudo)
+
+ add_compiler_rt_runtime(clang_rt.scudo_cxx
+ STATIC
+ ARCHS ${SCUDO_SUPPORTED_ARCH}
+ SOURCES ${SCUDO_CXX_SOURCES}
+ OBJECT_LIBS RTUbsan_cxx
+ CFLAGS ${SCUDO_CFLAGS}
+ PARENT_TARGET scudo)
+
+ add_compiler_rt_runtime(clang_rt.scudo
+ SHARED
+ ARCHS ${SCUDO_SUPPORTED_ARCH}
+ SOURCES ${SCUDO_SOURCES} ${SCUDO_CXX_SOURCES}
+ OBJECT_LIBS RTSanitizerCommonNoTermination
+ RTSanitizerCommonLibc
+ RTInterception
+ RTUbsan
+ RTUbsan_cxx
+ CFLAGS ${SCUDO_CFLAGS}
+ LINK_LIBS ${SCUDO_DYNAMIC_LIBS}
+ PARENT_TARGET scudo)
endif()