diff --git a/.arcconfig b/.arcconfig --- a/.arcconfig +++ b/.arcconfig @@ -1,8 +1,8 @@ { - "phabricator.uri" : "https://reviews.llvm.org/", - "repository.callsign" : "G", - "conduit_uri" : "https://reviews.llvm.org/", - "base": "git:HEAD^", - "arc.land.onto.default": "main", - "arc.land.onto": ["main"] + "phabricator.uri" : "https://reviews.llvm.org/", + "repository.callsign" : "G", + "conduit_uri" : "https://reviews.llvm.org/", + "base": "git:HEAD^", + "arc.land.onto.default": "main", + "arc.land.onto": ["main"] } diff --git a/OWNERS b/OWNERS new file mode 100644 --- /dev/null +++ b/OWNERS @@ -0,0 +1 @@ +include toolchain/llvm_android:/OWNERS diff --git a/compiler-rt/lib/tsan/CMakeLists.txt b/compiler-rt/lib/tsan/CMakeLists.txt --- a/compiler-rt/lib/tsan/CMakeLists.txt +++ b/compiler-rt/lib/tsan/CMakeLists.txt @@ -25,6 +25,12 @@ append_list_if(COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG -Wglobal-constructors TSAN_RTL_CFLAGS) +set(TSAN_RTL_DYNAMIC_CFLAGS ${TSAN_RTL_CFLAGS}) +list(REMOVE_ITEM TSAN_RTL_DYNAMIC_CFLAGS -fPIE) + +append_list_if(COMPILER_RT_HAS_LIBDL dl TSAN_DYNAMIC_LINK_LIBS) +append_list_if(COMPILER_RT_HAS_LIBPTHREAD pthread TSAN_DYNAMIC_LINK_LIBS) + set(TSAN_SOURCES rtl/tsan_clock.cpp rtl/tsan_debugging.cpp @@ -245,6 +251,20 @@ PARENT_TARGET tsan) list(APPEND TSAN_RUNTIME_LIBRARIES clang_rt.tsan-${arch} clang_rt.tsan_cxx-${arch}) + add_compiler_rt_runtime(clang_rt.tsan + SHARED + ARCHS ${arch} + SOURCES ${TSAN_SOURCES} ${TSAN_ASM_SOURCES} + $ + $ + $ + $ + $ + $ + ADDITIONAL_HEADERS ${TSAN_HEADERS} + CFLAGS ${TSAN_RTL_DYNAMIC_CFLAGS} + LINK_LIBS ${TSAN_DYNAMIC_LINK_LIBS} + PARENT_TARGET tsan) add_sanitizer_rt_symbols(clang_rt.tsan ARCHS ${arch} EXTRA rtl/tsan.syms.extra)