diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 16:34:46 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 16:39:43 +0100 |
commit | 86ba184394094c7c043a505a20a0b1b8977f73d7 (patch) | |
tree | 97479111778906db083c6b3ffe137d25f7ad3cfb /solenv | |
parent | Resolves: rhbz#1175142 nStarts ends up as an invalid -1 (diff) | |
download | core-86ba184394094c7c043a505a20a0b1b8977f73d7.tar.gz core-86ba184394094c7c043a505a20a0b1b8977f73d7.zip |
Introduce gb_*_set_external_code
...to harmonize the mechanisms to not define LIBO_INTERNAL_ONLY for extension
code and CppunitTest_odk_checkapi. (It also needs to revert any -Wundef, as the
config_host/config_*.h files will not be included, so the HAVE_* macros will be
undefined.)
This obsoletes the need for RTL_DISABLE_FAST_STRING.
Change-Id: If5eacba80c349efb90762aade8f2ea6d2db7e314
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/CppunitTest.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/Executable.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/Library.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/LinkTarget.mk | 7 | ||||
-rw-r--r-- | solenv/gbuild/StaticLibrary.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/gbuild.mk | 14 | ||||
-rw-r--r-- | solenv/gbuild/platform/com_GCC_class.mk | 5 | ||||
-rw-r--r-- | solenv/gbuild/platform/com_MSC_class.mk | 1 |
8 files changed, 24 insertions, 7 deletions
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk index 47f1110d078b..dd535ae77974 100644 --- a/solenv/gbuild/CppunitTest.mk +++ b/solenv/gbuild/CppunitTest.mk @@ -385,6 +385,7 @@ $(eval $(foreach method,\ use_custom_headers \ set_visibility_default \ set_warnings_not_errors \ + set_external_code \ set_generated_cxx_suffix \ disable_compiler_plugins \ ,\ diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk index 83298ad8dcfa..d45e2dc27964 100644 --- a/solenv/gbuild/Executable.mk +++ b/solenv/gbuild/Executable.mk @@ -138,6 +138,7 @@ $(eval $(foreach method,\ set_precompiled_header \ add_nativeres \ set_warnings_not_errors \ + set_external_code \ set_generated_cxx_suffix \ disable_compiler_plugins \ ,\ diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk index 17135e5dcfd9..c66b57c1807a 100644 --- a/solenv/gbuild/Library.mk +++ b/solenv/gbuild/Library.mk @@ -223,6 +223,7 @@ $(eval $(foreach method,\ set_nativeres \ set_visibility_default \ set_warnings_not_errors \ + set_external_code \ set_generated_cxx_suffix \ disable_compiler_plugins \ ,\ diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk index 948f65676a86..104c5b663e93 100644 --- a/solenv/gbuild/LinkTarget.mk +++ b/solenv/gbuild/LinkTarget.mk @@ -615,6 +615,7 @@ $(call gb_LinkTarget_get_target,$(1)) : EXTRAOBJECTLISTS := $(call gb_LinkTarget_get_target,$(1)) : NATIVERES := $(call gb_LinkTarget_get_target,$(1)) : VISIBILITY := $(call gb_LinkTarget_get_target,$(1)) : WARNINGS_NOT_ERRORS := +$(call gb_LinkTarget_get_target,$(1)) : EXTERNAL_CODE := $(call gb_LinkTarget_get_target,$(1)) : SOVERSIONSCRIPT := $(call gb_LinkTarget_get_target,$(1)) : T_COMPILER_PLUGINS := $$(COMPILER_PLUGINS) @@ -1369,6 +1370,12 @@ $(call gb_LinkTarget_get_target,$(1)) : WARNINGS_NOT_ERRORS := $(true) endef +# call gb_LinkTarget_set_external_code,linktarget +define gb_LinkTarget_set_external_code +$(call gb_LinkTarget_get_target,$(1)) : EXTERNAL_CODE := $(true) + +endef + # Set suffix of C++ files, if different from 'cxx' # # This is useful for external libraries. diff --git a/solenv/gbuild/StaticLibrary.mk b/solenv/gbuild/StaticLibrary.mk index a78a781fe563..a6e0795ecbe6 100644 --- a/solenv/gbuild/StaticLibrary.mk +++ b/solenv/gbuild/StaticLibrary.mk @@ -110,6 +110,7 @@ $(eval $(foreach method,\ add_sdi_headers \ set_precompiled_header \ set_warnings_not_errors \ + set_external_code \ set_generated_cxx_suffix \ disable_compiler_plugins \ ,\ diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk index fbf13fe0e064..3d1f0f1292ce 100644 --- a/solenv/gbuild/gbuild.mk +++ b/solenv/gbuild/gbuild.mk @@ -210,13 +210,6 @@ gb_GLOBALDEFS := \ $(gb_COMPILERDEFS) \ $(gb_CPUDEFS) \ -# This is used to detect whether LibreOffice is being built (as opposed to building -# 3rd-party code). Used for tag deprecation for API we want to -# ensure is not used at all externally while we clean -# out our internal usage, for code in sal/ that should be used only internally, etc. -gb_GLOBALDEFS += \ - -DLIBO_INTERNAL_ONLY \ - ifeq ($(gb_ENABLE_DBGUTIL),$(true)) gb_GLOBALDEFS += -DDBG_UTIL @@ -268,6 +261,13 @@ gb_GLOBALDEFS += \ gb_GLOBALDEFS := $(sort $(gb_GLOBALDEFS)) +# This is used to detect whether LibreOffice is being built (as opposed to building +# 3rd-party code). Used for tag deprecation for API we want to +# ensure is not used at all externally while we clean +# out our internal usage, for code in sal/ that should be used only internally, etc. +gb_DEFS_INTERNAL := \ + -DLIBO_INTERNAL_ONLY \ + include $(GBUILDDIR)/Deliver.mk $(eval $(call gb_Deliver_init)) diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk index c7bf4b7bf668..59678bb394f7 100644 --- a/solenv/gbuild/platform/com_GCC_class.mk +++ b/solenv/gbuild/platform/com_GCC_class.mk @@ -54,6 +54,7 @@ $(call gb_Helper_abbreviate_dirs,\ $(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \ $(if $(5),$(gb_COMPILER_PLUGINS)) \ $(2) \ + $(if $(EXTERNAL_CODE),$(gb_CXXFLAGS_Wundef),$(gb_DEFS_INTERNAL)) \ -c $(3) \ -o $(1) \ $(call gb_cxx_dep_generation_options,$(1),$(4)) \ @@ -77,6 +78,7 @@ $(call gb_Helper_abbreviate_dirs,\ $(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \ $(gb_COMPILER_PLUGINS) \ $(T_CFLAGS) $(T_CFLAGS_APPEND) \ + $(if $(EXTERNAL_CODE),$(gb_CXXFLAGS_Wundef),$(gb_DEFS_INTERNAL)) \ -c $(2) \ -I$(dir $(2)) \ $(INCLUDE) \ @@ -93,6 +95,7 @@ $(call gb_Helper_abbreviate_dirs,\ $(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \ $(gb_COMPILER_PLUGINS) \ $(T_OBJCFLAGS) $(T_OBJCFLAGS_APPEND) \ + $(if $(EXTERNAL_CODE),$(gb_CXXFLAGS_Wundef),$(gb_DEFS_INTERNAL)) \ -c $(2) \ -I$(dir $(2)) \ $(INCLUDE) \ @@ -112,6 +115,7 @@ $(call gb_Helper_abbreviate_dirs,\ $(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \ $(gb_COMPILER_PLUGINS) \ $(T_CXXFLAGS) $(T_CXXFLAGS_APPEND) \ + $(if $(EXTERNAL_CODE),$(gb_CXXFLAGS_Wundef),$(gb_DEFS_INTERNAL)) \ -c $(2) \ -I$(dir $(2)) \ $(INCLUDE) \ @@ -128,6 +132,7 @@ $(call gb_Helper_abbreviate_dirs,\ $(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \ $(gb_COMPILER_PLUGINS) \ $(T_OBJCXXFLAGS) $(T_OBJCXXFLAGS_APPEND) \ + $(if $(EXTERNAL_CODE),$(gb_CXXFLAGS_Wundef),$(gb_DEFS_INTERNAL)) \ -c $(2) \ -I$(dir $(2)) \ $(INCLUDE) \ diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk index 7d220c55ea3d..92b6e2b0362e 100644 --- a/solenv/gbuild/platform/com_MSC_class.mk +++ b/solenv/gbuild/platform/com_MSC_class.mk @@ -42,6 +42,7 @@ $(call gb_Helper_abbreviate_dirs,\ $(if $(filter YES,$(CXXOBJECT_X64)), $(CXX_X64_BINARY), \ $(if $(filter %.c,$(3)), $(gb_CC), $(gb_CXX))) \ $(DEFS) \ + $(if $(EXTERNAL_CODE),,$(gb_DEFS_INTERNAL)) \ $(gb_LTOFLAGS) \ $(2) \ $(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \ |