diff options
author | Francis Ricci <francisjricci@gmail.com> | 2017-01-09 03:51:42 +0000 |
---|---|---|
committer | Francis Ricci <francisjricci@gmail.com> | 2017-01-09 03:51:42 +0000 |
commit | ae4b8805fdce22aacb5644520c4dc42ce2656ebf (patch) | |
tree | 77e6862afbfa593d23c5069cfd364d3334be406a /lib/sanitizer_common/tests | |
parent | cf0113c530ec1a9e44a3fcec909ee10725df5347 (diff) |
Enable weak hooks on darwin
Summary:
By default, darwin requires a definition for weak interface functions at
link time. Adding the '-U' link flag with each weak function allows these
weak interface functions to be used without definitions, which mirrors
behavior on linux and windows.
Reviewers: compnerd, eugenis
Subscribers: kubabrecka, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D28203
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@291417 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/tests')
-rw-r--r-- | lib/sanitizer_common/tests/CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sanitizer_common/tests/CMakeLists.txt b/lib/sanitizer_common/tests/CMakeLists.txt index b66f7563b..841acb315 100644 --- a/lib/sanitizer_common/tests/CMakeLists.txt +++ b/lib/sanitizer_common/tests/CMakeLists.txt @@ -81,6 +81,9 @@ endif() if(APPLE) list(APPEND SANITIZER_TEST_CFLAGS_COMMON ${DARWIN_osx_CFLAGS}) list(APPEND SANITIZER_TEST_LINK_FLAGS_COMMON ${DARWIN_osx_LINKFLAGS}) + + add_weak_symbols("sanitizer_common" WEAK_SYMBOL_LINKFLAGS) + list(APPEND SANITIZER_TEST_LINK_FLAGS_COMMON ${WEAK_SYMBOL_LINKFLAGS}) endif() # MSVC linker is allocating 1M for the stack by default, which is not |