Don't pass -z defs to libc++ with MKSANITIZER=yes
Sanitizers are conflicting with this option: When linking shared libraries, the AddressSanitizer run-time is not linked, so -Wl,-z,defs may cause link errors (t use it with AddressSanitizer). https://clang.llvm.org/docs/AddressSanitizer.html When linking shared libraries, the MemorySanitizer run-time is not linked, so -Wl,-z,defs may cause link errors (t use it with MemorySanitizer). https://clang.llvm.org/docs/MemorySanitizer.html Solution suggested by <christos> Root cause of breaking libc++ investigated by <Yang Zheng>
This commit is contained in:
parent
ac571c1616
commit
3aa96d1801
4
external/bsd/libc++/lib/Makefile
vendored
4
external/bsd/libc++/lib/Makefile
vendored
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile,v 1.10 2017/01/11 12:10:26 joerg Exp $
|
||||
# $NetBSD: Makefile,v 1.11 2018/06/06 12:02:43 kamil Exp $
|
||||
|
||||
LIB= c++
|
||||
WARNS= 4
|
||||
@ -44,6 +44,8 @@ CWARNFLAGS.clang+= -Wno-error=missing-prototypes -Wno-error=sometimes-uninitiali
|
||||
CWARNFLAGS.clang+= -Wno-error=missing-field-initializers -Wno-error=switch
|
||||
CWARNFLAGS.clang+= -Wno-error=implicit-exception-spec-mismatch
|
||||
|
||||
.if ${MKSANITIZER} != "yes"
|
||||
LDFLAGS+= -Wl,-z,defs
|
||||
.endif
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
Loading…
Reference in New Issue
Block a user