[PATCH] D28203: Enable weak hooks on darwin
Kuba (Brecka) Mracek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 6 16:51:57 PST 2017
kubabrecka accepted this revision.
kubabrecka added a comment.
This revision is now accepted and ready to land.
LGTM with a nit.
Note that https://reviews.llvm.org/D28359 was trying to solve a similar problem with weak linking on Windows, so maybe there are more changes coming, but this patch doesn't need to be blocked on that.
================
Comment at: cmake/Modules/SanitizerUtils.cmake:53
+ foreach(SYMBOL ${WEAK_SYMBOLS})
+ set(local_linkflags ${local_linkflags} -Wl,-U,${SYMBOL})
+ endforeach()
----------------
nit: add a comment saying that this is specific to Darwin/Mach-O
================
Comment at: lib/sanitizer_common/sanitizer_internal_defs.h:35
-#if (SANITIZER_LINUX || SANITIZER_WINDOWS) && !SANITIZER_GO
+#if (SANITIZER_LINUX || SANITIZER_MAC || SANITIZER_WINDOWS) && !SANITIZER_GO
# define SANITIZER_SUPPORTS_WEAK_HOOKS 1
----------------
What about FreeBSD? Just curious.
Repository:
rL LLVM
https://reviews.llvm.org/D28203
More information about the llvm-commits
mailing list