diff --git a/compiler-rt/lib/rtsan/CMakeLists.txt b/compiler-rt/lib/rtsan/CMakeLists.txt index d4296f56acd30d..b7e2362d31352c 100644 --- a/compiler-rt/lib/rtsan/CMakeLists.txt +++ b/compiler-rt/lib/rtsan/CMakeLists.txt @@ -25,7 +25,7 @@ set(RTSAN_CFLAGS ${COMPILER_RT_CXX_CFLAGS} -DSANITIZER_COMMON_NO_REDEFINE_BUILTINS) set(RTSAN_LINK_FLAGS ${COMPILER_RT_COMMON_LINK_FLAGS}) -set(RTSAN_LINK_LIBS +set(RTSAN_DYNAMIC_LIBS ${COMPILER_RT_UNWINDER_LINK_LIBS} ${SANITIZER_CXX_ABI_LIBRARIES} ${SANITIZER_COMMON_LINK_LIBS}) @@ -61,11 +61,11 @@ set(RTSAN_COMMON_RUNTIME_OBJECT_LIBS RTSanitizerCommonCoverage RTSanitizerCommonSymbolizer) -append_list_if(COMPILER_RT_HAS_LIBDL dl RTSAN_LINK_LIBS) -append_list_if(COMPILER_RT_HAS_LIBRT rt RTSAN_LINK_LIBS) -append_list_if(COMPILER_RT_HAS_LIBM m RTSAN_LINK_LIBS) -append_list_if(COMPILER_RT_HAS_LIBPTHREAD pthread RTSAN_LINK_LIBS) -append_list_if(COMPILER_RT_HAS_LIBLOG log RTSAN_LINK_LIBS) +append_list_if(COMPILER_RT_HAS_LIBDL dl RTSAN_DYNAMIC_LIBS) +append_list_if(COMPILER_RT_HAS_LIBRT rt RTSAN_DYNAMIC_LIBS) +append_list_if(COMPILER_RT_HAS_LIBM m RTSAN_DYNAMIC_LIBS) +append_list_if(COMPILER_RT_HAS_LIBPTHREAD pthread RTSAN_DYNAMIC_LIBS) +append_list_if(COMPILER_RT_HAS_LIBLOG log RTSAN_DYNAMIC_LIBS) add_compiler_rt_component(rtsan) @@ -80,7 +80,7 @@ if (APPLE) OBJECT_LIBS RTRtsan ${RTSAN_COMMON_RUNTIME_OBJECT_LIBS} LINK_FLAGS ${RTSAN_LINK_FLAGS} - LINK_LIBS ${RTSAN_LINK_LIBS} + LINK_LIBS ${RTSAN_DYNAMIC_LIBS} PARENT_TARGET rtsan) else() add_compiler_rt_runtime(clang_rt.rtsan