diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-04-16 16:11:39 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-05-03 13:46:25 +0200 |
commit | 9a7aa3326d087c79879e435179e359dd76aa5e0a (patch) | |
tree | 444364cd0af0a8741b2ec206e29a8cb5cda1ef57 /solenv | |
parent | c0038f61aff45595c962911f16dfdef93f41924e (diff) |
The -fvisibility-ms-compat hack is no longer needed for UBSan on Linux...
...with latest Clang trunk towards Clang 9. All the no-longer necessary hacks
are made conditional on new NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY, which is
still set for UBSan builds with older Clang on Linux (but which should
eventually be purged).
Various classes needed additional SAL_DLLPUBLIC_RTTI annotations, as building
with UBSan instrumentation can generate references to RTTI symbols from
additional places like outside a dynamic library that used to hide those symbols
by default (but used to not hide them for old UBSan builds thanks to the
-fvisibility-ms-compat hack).
The odr-violation suppressions in solenv/sanitizers/asan-suppressions (which is
not referenced from anywhere in the code base, but meant to be included in an
ASan/UBSan build's ASAN_OPTIONS env var) are also no longer needed when
NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY is false.
Change-Id: I24ec3e388b0cbab50dbe2bf008d9569bff7bf25a
Reviewed-on: https://gerrit.libreoffice.org/70829
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/platform/com_GCC_defs.mk | 7 | ||||
-rw-r--r-- | solenv/gbuild/platform/unxgcc.mk | 4 |
2 files changed, 4 insertions, 7 deletions
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 28bb7138d0d7..3946662d8f67 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -121,11 +121,10 @@ endif # If CC or CXX already include -fvisibility=hidden, don't duplicate it ifeq (,$(filter -fvisibility=hidden,$(CC))) -gb_VISIBILITY_FLAGS := -fvisibility=hidden -ifeq ($(COM_IS_CLANG),TRUE) -ifneq ($(filter -fsanitize=%,$(CC)),) +ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE) gb_VISIBILITY_FLAGS := -fvisibility-ms-compat -endif +else +gb_VISIBILITY_FLAGS := -fvisibility=hidden endif endif gb_VISIBILITY_FLAGS_CXX := -fvisibility-inlines-hidden diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index 0cd205891d2e..1d6b38cdf8ce 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -84,12 +84,10 @@ endif ifneq ($(HAVE_LD_BSYMBOLIC_FUNCTIONS),) gb_LinkTarget_LDFLAGS += -Wl,-Bsymbolic-functions -ifeq ($(COM_IS_CLANG),TRUE) -ifneq ($(filter -fsanitize=%,$(CC)),) +ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE) gb_LinkTarget_LDFLAGS += -Wl,--dynamic-list-cpp-typeinfo endif endif -endif gb_LINKEROPTFLAGS := -Wl,-O1 gb_LINKERSTRIPDEBUGFLAGS := -Wl,-S |