Kaydet (Commit) 9a7aa332 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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: 's avatarStephan Bergmann <sbergman@redhat.com>
üst c0038f61
......@@ -410,6 +410,7 @@ export MWAW_LIBS=$(gb_SPACE)@MWAW_LIBS@
export MYTHES_CFLAGS=$(gb_SPACE)@MYTHES_CFLAGS@
export MYTHES_LIBS=$(gb_SPACE)@MYTHES_LIBS@
export NASM=@NASM@
export NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY=@NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY@
export NEON_CFLAGS=$(gb_SPACE)@NEON_CFLAGS@
export NEON_LIBS=$(gb_SPACE)@NEON_LIBS@
export NEON_VERSION=@NEON_VERSION@
......
......@@ -3864,6 +3864,28 @@ else
fi
AC_SUBST(ENABLE_DEBUG)
AC_MSG_CHECKING([whether special RTTI visibility flags are needed for Clang Linux UBSan])
NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY=
dnl Clang 9 is known fixed since
dnl <https://github.com/llvm/llvm-project/commit/5745eccef54ddd3caca278d1d292a88b2281528b> "Adapt
dnl -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO":
if test "$COM_IS_CLANG" = TRUE && test "$CLANGVER" -lt 90000 && test "$_os" = Linux; then
for i in $CC; do
case $i in
-fsanitize=*)
NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY=TRUE
break
;;
esac
done
fi
if test "$NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY" = TRUE; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
AC_SUBST([NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY])
dnl ===================================================================
dnl Select the linker to use (gold/lld/ld.bfd).
dnl This is done only after compiler checks (need to know if Clang is
......@@ -3889,17 +3911,8 @@ printf ("hello world\n");
AC_MSG_RESULT( yes )
use_ld_ok=yes
dnl For obscure reasons, unxgcc.mk uses the --dynamic-list-cpp-typeinfo linker option
dnl if sanitizers are used, and lld doesn't support this option.
use_ld_has_sanitizers=
for i in $CC; do
case $i in
-fsanitize=*)
use_ld_has_sanitizers=yes
break
;;
esac
done
if test -n "$use_ld_has_sanitizers"; then
dnl if NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY, and lld doesn't support this option.
if test -n "$NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY"; then
AC_MSG_CHECKING([for --dynamic-list-cpp-typeinfo linker support (-fuse-ld=$use_ld)])
use_ld_ldflags_save_2="$LDFLAGS"
LDFLAGS="$LDFLAGS -Wl,--dynamic-list-cpp-typeinfo"
......
......@@ -19,12 +19,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,libabw, \
external/libabw/libabw-msvc.patch.1 \
))
ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),)
ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,libabw, \
external/libabw/ubsan-visibility.patch \
))
endif
endif
# vim: set noet sw=4 ts=4:
......@@ -19,12 +19,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,libcdr, \
external/libcdr/libcdr-visibility-win.patch \
))
ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),)
ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,libcdr, \
external/libcdr/ubsan-visibility.patch \
))
endif
endif
# vim: set noet sw=4 ts=4:
......@@ -15,12 +15,10 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libebook,0))
$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libebook))
ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),)
ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,libebook, \
external/libebook/ubsan-visibility.patch \
))
endif
endif
# vim: set noet sw=4 ts=4:
......@@ -10,11 +10,9 @@
epubgen_patches :=
epubgen_patches += tdf-120491.patch
ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),)
ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
epubgen_patches += ubsan-visibility.patch
endif
endif
$(eval $(call gb_UnpackedTarball_UnpackedTarball,libepubgen))
......
......@@ -32,12 +32,10 @@ endif
endif
endif
ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),)
ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,libetonyek, \
external/libetonyek/ubsan-visibility.patch \
))
endif
endif
# vim: set noet sw=4 ts=4:
......@@ -15,12 +15,10 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libfreehand,0))
$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libfreehand))
ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),)
ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,libfreehand, \
external/libfreehand/ubsan-visibility.patch \
))
endif
endif
# vim: set noet sw=4 ts=4:
......@@ -25,12 +25,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,libmspub, \
))
endif
ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),)
ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,libmspub, \
external/libmspub/ubsan-visibility.patch \
))
endif
endif
# vim: set noet sw=4 ts=4:
......@@ -15,13 +15,11 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libmwaw,0))
$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libmwaw))
ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),)
ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,libmwaw, \
external/libmwaw/ubsan-visibility.patch \
))
endif
endif
ifneq ($(OS),MACOSX)
ifneq ($(OS),WNT)
......
......@@ -15,13 +15,11 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libodfgen,0))
$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libodfgen))
ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),)
ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,libodfgen, \
external/libodfgen/ubsan-visibility.patch \
))
endif
endif
ifeq ($(SYSTEM_REVENGE),)
$(eval $(call gb_UnpackedTarball_add_patches,libodfgen, \
......
......@@ -15,12 +15,10 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libpagemaker,0))
$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libpagemaker))
ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),)
ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,libpagemaker, \
external/libpagemaker/ubsan-visibility.patch \
))
endif
endif
# vim: set noet sw=4 ts=4:
......@@ -15,13 +15,11 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libqxp,0))
$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libqxp))
ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),)
ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,libqxp, \
external/libqxp/ubsan-visibility.patch \
))
endif
endif
$(eval $(call gb_UnpackedTarball_add_patches,libqxp, \
external/libqxp/android-workaround.patch.1 \
......
......@@ -19,13 +19,11 @@ $(eval $(call gb_UnpackedTarball_add_patches,librevenge, \
external/librevenge/rpath.patch \
))
ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),)
ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,librevenge, \
external/librevenge/ubsan-visibility.patch \
))
endif
endif
ifneq ($(OS),MACOSX)
ifneq ($(OS),WNT)
......
......@@ -15,13 +15,11 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libstaroffice,0))
$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libstaroffice))
ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),)
ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,libstaroffice, \
external/libstaroffice/ubsan-visibility.patch \
))
endif
endif
ifneq ($(OS),MACOSX)
ifneq ($(OS),WNT)
......
......@@ -20,12 +20,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,libvisio, \
external/libvisio/0001-fix-debug-build.patch.1 \
))
ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),)
ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,libvisio, \
external/libvisio/ubsan-visibility.patch \
))
endif
endif
# vim: set noet sw=4 ts=4:
......@@ -27,12 +27,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,libwps,\
endif
endif
ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),)
ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,libwps, \
external/libwps/ubsan-visibility.patch.0 \
))
endif
endif
# vim: set noet sw=4 ts=4:
......@@ -15,13 +15,11 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libzmf,0))
$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libzmf))
ifeq ($(COM_IS_CLANG),TRUE)
ifneq ($(filter -fsanitize=%,$(CC)),)
ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,libzmf, \
external/libzmf/ubsan-visibility.patch \
))
endif
endif
$(eval $(call gb_UnpackedTarball_add_patches,libzmf, \
external/libzmf/android-workaround.patch.1 \
......
......@@ -122,7 +122,7 @@ struct OOX_DLLPUBLIC ShapeTypeModel
/** A shape template contains all formatting properties of shapes and can serve
as templates for several shapes in a drawing. */
class ShapeType
class SAL_DLLPUBLIC_RTTI ShapeType
{
public:
explicit ShapeType( Drawing& rDrawing );
......
......@@ -66,7 +66,7 @@ namespace accessibility {
> AccessibleControlShape_Base;
/** @descr
*/
class AccessibleControlShape final
class SAL_DLLPUBLIC_RTTI AccessibleControlShape final
:public AccessibleShape
,public AccessibleControlShape_Base
{
......
......@@ -134,7 +134,7 @@ inline std::basic_ostream<charT, traits> & operator <<(
SVX_DLLPUBLIC void FillEquationParameter( const css::drawing::EnhancedCustomShapeParameter&, const sal_Int32, EnhancedCustomShapeEquation& );
class ExpressionNode
class SAL_DLLPUBLIC_RTTI ExpressionNode
{
public:
virtual ~ExpressionNode();
......
......@@ -63,7 +63,7 @@ enum class GridRowStatus
// DbGridRow, description of rows
class DbGridRow : public SvRefBase
class SAL_DLLPUBLIC_RTTI DbGridRow : public SvRefBase
{
css::uno::Any m_aBookmark; // Bookmark of the row, can be set
::std::vector< std::unique_ptr<::svxform::DataColumn> >
......
......@@ -175,7 +175,7 @@ protected:
// class VCLXCheckBox
class VCLXCheckBox : public css::awt::XCheckBox,
class SAL_DLLPUBLIC_RTTI VCLXCheckBox : public css::awt::XCheckBox,
public css::awt::XButton,
public VCLXGraphicControl
{
......@@ -233,7 +233,7 @@ public:
// class VCLXRadioButton
class VCLXRadioButton : public css::awt::XRadioButton,
class SAL_DLLPUBLIC_RTTI VCLXRadioButton : public css::awt::XRadioButton,
public css::awt::XButton,
public VCLXGraphicControl
{
......@@ -562,7 +562,7 @@ public:
// class VCLXScrollBar
class VCLXScrollBar : public css::awt::XScrollBar,
class SAL_DLLPUBLIC_RTTI VCLXScrollBar : public css::awt::XScrollBar,
public VCLXWindow
{
private:
......@@ -874,7 +874,7 @@ public:
// class VCLXFormattedSpinField
class VCLXFormattedSpinField : public VCLXSpinField
class SAL_DLLPUBLIC_RTTI VCLXFormattedSpinField : public VCLXSpinField
{
private:
FormatterBase* mpFormatter;
......
......@@ -26,7 +26,7 @@
/**
PropertyHandler for a named xml bool type:
*/
class XMLNamedBoolPropertyHdl : public XMLPropertyHandler
class SAL_DLLPUBLIC_RTTI XMLNamedBoolPropertyHdl : public XMLPropertyHandler
{
private:
const OUString maTrueStr;
......
......@@ -36,7 +36,7 @@ namespace xmloff
//= ORotationAngleHandler
class ORotationAngleHandler : public XMLPropertyHandler
class SAL_DLLPUBLIC_RTTI ORotationAngleHandler : public XMLPropertyHandler
{
public:
ORotationAngleHandler();
......@@ -48,7 +48,7 @@ namespace xmloff
//= OFontWidthHandler
class OFontWidthHandler : public XMLPropertyHandler
class SAL_DLLPUBLIC_RTTI OFontWidthHandler : public XMLPropertyHandler
{
public:
OFontWidthHandler();
......@@ -60,7 +60,7 @@ namespace xmloff
//= OControlBorderHandlerBase
class OControlBorderHandler : public XMLPropertyHandler
class SAL_DLLPUBLIC_RTTI OControlBorderHandler : public XMLPropertyHandler
{
public:
enum BorderFacet
......
......@@ -174,7 +174,7 @@ public:
// this is only for the XML Export in the hxx
class ScChangeActionContent;
class ScChangeAction
class SAL_DLLPUBLIC_RTTI ScChangeAction
{
friend class ScChangeTrack;
friend class ScChangeActionIns;
......@@ -363,7 +363,7 @@ public:
};
// ScChangeActionIns
class ScChangeActionIns : public ScChangeAction
class SAL_DLLPUBLIC_RTTI ScChangeActionIns : public ScChangeAction
{
friend class ScChangeTrack;
......@@ -398,7 +398,7 @@ public:
};
// ScChangeActionDel
class ScChangeActionMove;
class SAL_DLLPUBLIC_RTTI ScChangeActionMove;
class ScChangeActionDelMoveEntry : public ScChangeActionLinkEntry
{
......@@ -597,7 +597,7 @@ enum ScChangeActionContentCellType
SC_CACCT_MATREF
};
class ScChangeActionContent : public ScChangeAction
class SAL_DLLPUBLIC_RTTI ScChangeActionContent : public ScChangeAction
{
friend class ScChangeTrack;
......@@ -817,7 +817,7 @@ enum ScChangeTrackMergeState
// and are decremented, to keep values in a table separated from "normal" actions.
#define SC_CHGTRACK_GENERATED_START (sal_uInt32(0xfffffff0))
class ScChangeTrack : public utl::ConfigurationListener
class SAL_DLLPUBLIC_RTTI ScChangeTrack : public utl::ConfigurationListener
{
friend void ScChangeAction::RejectRestoreContents( ScChangeTrack*, SCCOL, SCROW );
friend bool ScChangeActionDel::Reject( ScDocument* pDoc );
......
......@@ -128,7 +128,7 @@ public:
};
// ScDataPilotDescriptorBase is never instantiated directly
class ScDataPilotDescriptorBase : public css::sheet::XDataPilotDescriptor,
class SAL_DLLPUBLIC_RTTI ScDataPilotDescriptorBase : public css::sheet::XDataPilotDescriptor,
public css::beans::XPropertySet,
public css::sheet::XDataPilotDataLayoutFieldSupplier,
public css::lang::XServiceInfo,
......
......@@ -58,7 +58,7 @@ protected:
ScRangeList maDirtyTableColumnNames;
};
class ScDBData : public SvtListener, public ScRefreshTimer
class SAL_DLLPUBLIC_RTTI ScDBData : public SvtListener, public ScRefreshTimer
{
private:
std::unique_ptr<ScSortParam> mpSortParam;
......
......@@ -39,7 +39,7 @@ class SharedStringPool;
}
struct ScQueryParamBase
struct SAL_DLLPUBLIC_RTTI ScQueryParamBase
{
utl::SearchParam::SearchType eSearchType;
bool bHasHeader;
......@@ -99,7 +99,7 @@ inline std::basic_ostream<charT, traits> & operator <<(std::basic_ostream<charT,
return stream;
}
struct ScQueryParamTable
struct SAL_DLLPUBLIC_RTTI ScQueryParamTable
{
SCCOL nCol1;
SCROW nRow1;
......
......@@ -77,7 +77,7 @@ class ScMarkData;
struct ScDragData;
class SfxDialogController;
class ScModule: public SfxModule, public SfxListener, public utl::ConfigurationListener
class SAL_DLLPUBLIC_RTTI ScModule: public SfxModule, public SfxListener, public utl::ConfigurationListener
{
Timer m_aIdleTimer;
Idle m_aSpellIdle;
......
......@@ -26,7 +26,7 @@
class ScStyleSheetPool;
class ScStyleSheet final : public SfxStyleSheet
class SAL_DLLPUBLIC_RTTI ScStyleSheet final : public SfxStyleSheet
{
friend class ScStyleSheetPool;
......
......@@ -82,7 +82,7 @@ public:
const ImageMap& GetImageMap() const { return aImageMap; }
};
class ScMacroInfo : public SdrObjUserData
class SAL_DLLPUBLIC_RTTI ScMacroInfo : public SdrObjUserData
{
public:
ScMacroInfo();
......
......@@ -35,7 +35,7 @@ class ScDPSaveData;
struct ScDPNumGroupInfo;
struct ScSubTotalParam;
class ScDBFunc : public ScViewFunc
class SAL_DLLPUBLIC_RTTI ScDBFunc : public ScViewFunc
{
private:
void GetSelectedMemberList(ScDPUniqueStringSet& rEntries, long& rDimension);
......
......@@ -82,7 +82,7 @@ struct SpellCallbackInfo;
// predefines
namespace sdr { namespace overlay { class OverlayObjectList; }}
class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSourceHelper
class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSourceHelper
{
// ScFilterListBox is always used for selection list
friend class ScFilterListBox;
......
......@@ -29,7 +29,7 @@ class ScDocShell;
class ScPreviewShell;
class FmFormView;
class ScPreview : public vcl::Window
class SAL_DLLPUBLIC_RTTI ScPreview : public vcl::Window
{
private:
ScMarkData::MarkedTabsType maSelectedTabs;
......
......@@ -36,7 +36,7 @@ namespace com { namespace sun { namespace star {
}
}}}
class ScTransferObj : public TransferableHelper
class SAL_DLLPUBLIC_RTTI ScTransferObj : public TransferableHelper
{
private:
ScDocumentUniquePtr m_pDoc;
......
......@@ -365,7 +365,7 @@ private:
typedef std::shared_ptr< InteractiveSequence > InteractiveSequencePtr;
typedef std::vector< InteractiveSequencePtr > InteractiveSequenceVector;
class MainSequence : public EffectSequenceHelper, public ISequenceListener
class SAL_DLLPUBLIC_RTTI MainSequence : public EffectSequenceHelper, public ISequenceListener
{
friend class UndoAnimation;
friend class MainSequenceRebuildGuard;
......
......@@ -69,7 +69,7 @@ typedef std::map< sal_uInt32, css::uno::Sequence< css::uno::Type> > SdTypesCache
*/
class SdModule final : public SfxModule, public SfxListener
class SAL_DLLPUBLIC_RTTI SdModule final : public SfxModule, public SfxListener
{
public:
SFX_DECL_INTERFACE(SD_IF_SDAPP)
......
......@@ -45,7 +45,7 @@ typedef ::cppu::ImplInheritanceHelper< SfxStyleSheetPool,
css::container::XNameAccess,
css::lang::XComponent > SdStyleSheetPoolBase;
class SdStyleSheetPool final : public SdStyleSheetPoolBase, public SfxListener
class SAL_DLLPUBLIC_RTTI SdStyleSheetPool final : public SdStyleSheetPoolBase, public SfxListener
{
friend class SdDrawDocument;
public:
......
......@@ -65,7 +65,7 @@ class ViewOverlayManager;
overview over several slides or a textual
overview over the text in an Impress document (OutlineViewShell).
*/
class DrawViewShell
class SAL_DLLPUBLIC_RTTI DrawViewShell
: public ViewShell,
public SfxListener,
public utl::ConfigurationListener
......
......@@ -35,7 +35,7 @@ namespace sd {
ViewShell that turns off some of the features for GraphicViewShell
instances.</p>
*/
class GraphicViewShell final
class SAL_DLLPUBLIC_RTTI GraphicViewShell final
: public DrawViewShell
{
public:
......
......@@ -31,7 +31,7 @@ namespace sd {
*/
class DrawViewShell;
class LayerTabBar final
class SAL_DLLPUBLIC_RTTI LayerTabBar final
: public TabBar,
public DropTargetHelper
{
......
......@@ -35,7 +35,7 @@ namespace sd { namespace slidesorter {
class SlideSorter;
class SlideSorterViewShell
class SAL_DLLPUBLIC_RTTI SlideSorterViewShell
: public ViewShell
{
friend class controller::SlotManager;
......
......@@ -86,7 +86,7 @@ static const DrawModeFlags OUTPUT_DRAWMODE_CONTRAST
<p>This class replaces the former ViewShell class.</p>
*/
class ViewShell
class SAL_DLLPUBLIC_RTTI ViewShell
: public SfxShell
{
public:
......
......@@ -52,7 +52,7 @@ namespace sd { namespace slidesorter { namespace controller {
class SlideSorterController;
class Clipboard
class SAL_DLLPUBLIC_RTTI Clipboard
: public ViewClipboard
{
public:
......
......@@ -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
......
......@@ -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
......
......@@ -56,7 +56,7 @@ namespace sw { namespace sidebarwindows {
namespace sw { namespace annotation {
class SwAnnotationWin : public vcl::Window
class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window
{
public:
SwAnnotationWin( SwEditWin& rEditWin,
......
......@@ -124,7 +124,7 @@ class SwNoteProps: public utl::ConfigItem
virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override;
};
class SwPostItMgr: public SfxListener
class SAL_DLLPUBLIC_RTTI SwPostItMgr: public SfxListener
{
private:
SwView* mpView;
......
......@@ -145,7 +145,7 @@ public:
one of the instances with the same m_nHandle is actually in the document,
they're all cloned via CopyField()...
*/
class SwAuthorityField : public SwField
class SAL_DLLPUBLIC_RTTI SwAuthorityField : public SwField
{
rtl::Reference<SwAuthEntry> m_xAuthEntry;
mutable sal_IntPtr m_nTempSequencePos;
......
......@@ -302,7 +302,7 @@ bool CheckControlLayer( const SdrObject *pObj );
typedef std::unique_ptr< SwDrawVirtObj, SdrObjectFreeOp > SwDrawVirtObjPtr;
class SwDrawContact final : public SwContact
class SAL_DLLPUBLIC_RTTI SwDrawContact final : public SwContact
{
private:
/** anchored drawing object instance for the
......