Skip to content

Commit

Permalink
[sanitizer] Fix OSX build failure post D45457
Browse files Browse the repository at this point in the history
Summary:
It looks like OSX's UBSan needs a "NoHooks" version of
`RTSanitizerCommonSymbolizer` to work build properly.

Subscribers: kubamracek, mgorny, delcypher, llvm-commits, #sanitizers

Differential Revision: https://reviews.llvm.org/D45696

llvm-svn: 330146
  • Loading branch information
Kostya Kortchinsky committed Apr 16, 2018
1 parent e3fe669 commit 25eae5c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions compiler-rt/lib/sanitizer_common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,12 @@ add_compiler_rt_object_libraries(RTSanitizerCommonLibcNoHooks
SOURCES ${SANITIZER_LIBCDEP_SOURCES}
CFLAGS ${SANITIZER_NO_WEAK_HOOKS_CFLAGS}
DEFS ${SANITIZER_COMMON_DEFINITIONS})
add_compiler_rt_object_libraries(RTSanitizerCommonSymbolizerNoHooks
${OS_OPTION}
ARCHS ${SANITIZER_COMMON_SUPPORTED_ARCH}
SOURCES ${SANITIZER_SYMBOLIZER_SOURCES}
CFLAGS ${SANITIZER_NO_WEAK_HOOKS_CFLAGS}
DEFS ${SANITIZER_COMMON_DEFINITIONS})

if(OS_NAME MATCHES "SunOS")
# Solaris ld doesn't support the non-standard GNU ld extension of adding
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/ubsan/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ if(APPLE)
RTSanitizerCommonNoHooks
RTSanitizerCommonLibcNoHooks
RTSanitizerCommonCoverage
RTSanitizerCommonSymbolizer
RTSanitizerCommonSymbolizerNoHooks
RTInterception
LINK_FLAGS ${WEAK_SYMBOL_LINK_FLAGS}
PARENT_TARGET ubsan)
Expand Down

0 comments on commit 25eae5c

Please sign in to comment.