Index: cmake/config-ix.cmake =================================================================== --- cmake/config-ix.cmake +++ cmake/config-ix.cmake @@ -245,6 +245,24 @@ -stdlib=libc++ -lc++ -lc++abi) + + set(DARWIN_WEAK_SYMBOLS + ___asan_default_options + ___asan_default_suppressions + ___asan_on_error + ___lsan_default_suppressions + ___lsan_is_turned_off + ___sanitizer_free_hook + ___sanitizer_malloc_hook + ___sanitizer_symbolize_code + ___sanitizer_symbolize_data + ___sanitizer_symbolize_demangle + ___sanitizer_symbolize_flush + ___ubsan_default_options) + + foreach(SYMBOL ${DARWIN_WEAK_SYMBOLS}) + set(DARWIN_COMMON_LINKFLAGS ${DARWIN_COMMON_LINKFLAGS} -Wl,-U,${SYMBOL}) + endforeach() check_linker_flag("-fapplication-extension" COMPILER_RT_HAS_APP_EXTENSION) if(COMPILER_RT_HAS_APP_EXTENSION)