diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-09-14 15:52:04 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-09-14 15:52:04 +0200 |
commit | 16bbeb5713f4f9894e81ecf34a0e00f56a425f96 (patch) | |
tree | 4b200ccc2a5c47dcdfee73bdcb88b1d9f7eaf364 /testtools/source/bridgetest | |
parent | 0f6cb25be8ef72ec1e3cadded38f0698edf08cb4 (diff) |
Change the shared bridgetest code from static to dynamic library
...so ASan builds do not complain about ODR violations due to multiple instances
of vtable for testtools::bridgetest::CurrentContextChecker after
a53808c0ed577468393aced90963af6496706959 "loplugin:dllprivate" removed the
SAL_DLLPRIVATE from class CurrentContextChecker (which apparently /did/ have an
impact with -fvisibility-ms-compat, as used by Linux Clang ASan/UBSan builds).
Change-Id: Ifb1ba1819f7ea989300f4696d44f9599a1436563
Diffstat (limited to 'testtools/source/bridgetest')
-rw-r--r-- | testtools/source/bridgetest/currentcontextchecker.hxx | 6 | ||||
-rw-r--r-- | testtools/source/bridgetest/dllapi.hxx | 25 | ||||
-rw-r--r-- | testtools/source/bridgetest/multi.hxx | 3 |
3 files changed, 32 insertions, 2 deletions
diff --git a/testtools/source/bridgetest/currentcontextchecker.hxx b/testtools/source/bridgetest/currentcontextchecker.hxx index f431762e90ce..1877392129ac 100644 --- a/testtools/source/bridgetest/currentcontextchecker.hxx +++ b/testtools/source/bridgetest/currentcontextchecker.hxx @@ -28,9 +28,11 @@ #include "sal/types.h" #include "test/testtools/bridgetest/XCurrentContextChecker.hpp" +#include <dllapi.hxx> + namespace testtools { namespace bridgetest { -class CurrentContextChecker : +class LO_DLLPUBLIC_TESTTOOLS CurrentContextChecker : public ::osl::DebugBase< CurrentContextChecker >, public ::cppu::WeakImplHelper< ::test::testtools::bridgetest::XCurrentContextChecker > @@ -49,7 +51,7 @@ private: CurrentContextChecker(CurrentContextChecker &) = delete; void operator =(CurrentContextChecker &) = delete; - bool performCheck( + SAL_DLLPRIVATE bool performCheck( css::uno::Reference< ::test::testtools::bridgetest::XCurrentContextChecker > const & other, ::sal_Int32 setSteps, ::sal_Int32 checkSteps); }; diff --git a/testtools/source/bridgetest/dllapi.hxx b/testtools/source/bridgetest/dllapi.hxx new file mode 100644 index 000000000000..8777a934a113 --- /dev/null +++ b/testtools/source/bridgetest/dllapi.hxx @@ -0,0 +1,25 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_TESTTOOLS_SOURCE_BRIDGETEST_DLLAPI_HXX +#define INCLUDED_TESTTOOLS_SOURCE_BRIDGETEST_DLLAPI_HXX + +#include <sal/config.h> + +#include <sal/types.h> + +#if defined LO_DLLIMPLEMENTATION_TESTTOOLS +#define LO_DLLPUBLIC_TESTTOOLS SAL_DLLPUBLIC_EXPORT +#else +#define LO_DLLPUBLIC_TESTTOOLS SAL_DLLPUBLIC_IMPORT +#endif + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/testtools/source/bridgetest/multi.hxx b/testtools/source/bridgetest/multi.hxx index 9909ce573247..6ed12840c7a0 100644 --- a/testtools/source/bridgetest/multi.hxx +++ b/testtools/source/bridgetest/multi.hxx @@ -29,6 +29,8 @@ #include "sal/types.h" #include "test/testtools/bridgetest/XMulti.hpp" +#include <dllapi.hxx> + namespace testtools { namespace bridgetest { class Multi: public cppu::WeakImplHelper< test::testtools::bridgetest::XMulti > @@ -109,6 +111,7 @@ private: double m_attribute3; }; +LO_DLLPUBLIC_TESTTOOLS OUString testMulti( css::uno::Reference< test::testtools::bridgetest::XMulti > const & multi); } } |