The idl __attribute__((__weak__)) hack doesn't seem necessary for --enable-lto

dbfc495a9a "Add config option used when we try to
link one huge object file" had added it for the --enable-lto case, but without
documenting exactly what it should help with.  And at least my local Linux
--enable-lto --enable-dbgutil etc. build successfully does `make check &&
make screenshot` without it.

This removes the only use of STATIC_LINKING, so remove it completely.  (And
basctl/source/basicide/basidesh.cxx still needs to include config_options.h for
ENABLE_MERGELIBS.)

Change-Id: I3820e1cacccc92f5ac0c9c7fcc539c29a6864694
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90804
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann
2020-03-20 16:15:32 +01:00
parent 81164d233e
commit cbb42f9dd4
8 changed files with 1 additions and 17 deletions

View File

@@ -2,8 +2,6 @@
assumeFilename: basctl/source/basicide/baside2b.cxx
blacklist:
basctl/source/basicide/basidesh.cxx:
# Needed for STATIC_LINKING
- config_options.h
# Needed for TypedWhichId defines is basslots.hxx
- sfx2/dinfdlg.hxx
- sfx2/minfitem.hxx

View File

@@ -5,12 +5,6 @@
#ifndef CONFIG_OPTIONS_H
#define CONFIG_OPTIONS_H
/*
* Whether we want to link as many object files as possible into one big object.
* True in case of --enable-lto.
*/
#define STATIC_LINKING 0
#define ENABLE_MERGELIBS 0
#define ENABLE_RUNTIME_OPTIMIZATIONS 0

View File

@@ -351,7 +351,6 @@ AC_MSG_CHECKING([whether to use link-time optimization])
if test -n "$enable_lto" -a "$enable_lto" != "no"; then
ENABLE_LTO="TRUE"
AC_MSG_RESULT([yes])
AC_DEFINE(STATIC_LINKING)
else
ENABLE_LTO=""
AC_MSG_RESULT([no])

View File

@@ -251,7 +251,7 @@ void SvMetaType::WriteSfxItem(
// write the implementation part
rOutStm.WriteCharPtr( "#ifdef SFX_TYPEMAP" ) << endl;
rOutStm.WriteCharPtr( "#if !defined(_WIN32) && ((defined(DISABLE_DYNLOADING) && (defined(ANDROID) || defined(IOS) || defined(LINUX))) || STATIC_LINKING)" ) << endl;
rOutStm.WriteCharPtr( "#if !defined(_WIN32) && (defined(DISABLE_DYNLOADING) && (defined(ANDROID) || defined(IOS) || defined(LINUX)))" ) << endl;
rOutStm.WriteCharPtr( "__attribute__((__weak__))" ) << endl;
rOutStm.WriteCharPtr( "#endif" ) << endl;
rOutStm.WriteOString( aTypeName ).WriteOString( aVarName )

View File

@@ -775,8 +775,6 @@ blacklist:
# Needed for direct member access
- ooo/vba/XSinkCaller.hpp
sc/source/ui/app/typemap.cxx:
# Needed for STATIC_LINKING to be there for scslots.hxx
- config_options.h
# Needed for MID* macros
- mid.h
- editeng/memberids.h

View File

@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_options.h>
#include <mid.h>
#include <editeng/memberids.h>
#include <svx/unomid.hxx>

View File

@@ -74,8 +74,6 @@ blacklist:
- sfx2/frame.hxx
- sfx2/msg.hxx
- sorgitm.hxx
# Needed for STATIC_LINKING to work
- config_options.h
sfx2/source/appl/newhelp.cxx:
# Actually used
- com/sun/star/i18n/XBreakIterator.hpp

View File

@@ -18,7 +18,6 @@
*/
#include <config_features.h>
#include <config_options.h>
#include <sal/config.h>