# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- # # 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/. # # This file incorporates work covered by the following license notice: # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed # with this work for additional information regarding copyright # ownership. The ASF licenses this file to you under the Apache # License, Version 2.0 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 . #
# defined by platform # gb_AsmObject_get_source (.asm on Windows, .s elsewhere) # gb_AsmObject__command # gb_CObject__command_pattern # gb_LinkTarget_CXXFLAGS # gb_LinkTarget_LDFLAGS # gb_LinkTarget_INCLUDE
# Same happens for the gb_LinkTarget_add_libs calls from RepositoryExternal.mk. But we have no real # way to separate for gbuild internal and external gb_LinkTarget_add_libs calls. # So this flags these call parameters with an @ postfix. But now these must be filtered out, so this # defines that filter, just in case we need to change it because it conflicts with some parameters. # FYI: on Windows, gb_Library_use_system_win32_libs also calls gb_LinkTarget_add_libs; easy to miss.
gb_LinkTarget__syslib = %@
# debug flags, if the LinkTarget is named in the list of libraries of ENABLE_SYMBOLS_FOR
gb_LinkTarget__get_debugflags= \
$(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS), \
$(if $(ENABLE_OPTIMIZED_DEBUG),$(gb_COMPILERDEBUGOPTFLAGS),$(gb_COMPILERNOOPTFLAGS))) \
$(if $(call gb_target_symbols_enabled,$(1)),$(gb_DEBUGINFO_FLAGS))
# T_LDFLAGS is just expanded once. Override the flags here, so that the linker and compiler use the same. ifeq (EMSCRIPTEN,$(OS))
gb_LinkTarget__get_debugldflags=$(call gb_LinkTarget__get_debugflags,$1) \
$(gb_LinkTarget__emscripten_warnings_ldflags) else # similar for LDFLAGS, use linker optimization flags in non-debug case, # but moreover strip debug from libraries for which debuginfo is not wanted # (some libraries reuse .o files from other libraries, notably unittests)
gb_LinkTarget__get_stripldflags=$(if $(strip $(CFLAGS)$(CXXFLAGS)$(OBJCFLAGS)$(OBJCXXFLAGS)$(LDFLAGS)),,$(gb_LINKERSTRIPDEBUGFLAGS))
gb_LinkTarget__get_debugldflags=$(if $(call gb_target_symbols_enabled,$(1)),$(gb_LINKER_DEBUGINFO_FLAGS),$(gb_LINKEROPTFLAGS) $(call gb_LinkTarget__get_stripldflags,$(1))) endif
# Used to run a compiler plugin tool. # # At least for now, these definitions are generic enough so that they can be # shared across all current use cases (COMPILER_EXTERNAL_TOOL, # COMPILER_PLUGIN_TOOL) on all relevant toolchains (GCC?, Clang, clang-cl). If # it ever becomes necessary, they can be moved to e.g. # platform/com_{GCC,MSC}_class.mk and made different there. # # $(call gb_CObject__tool_command,relative-source,source,compiler-plugins) define gb_CObject__tool_command
$(call gb_Helper_abbreviate_dirs,\
ICECC=no CCACHE_DISABLE=1 \
$(gb_CC) \
$(DEFS) \
$(T_LTOFLAGS) \
$(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
$(if $(WARNINGS_NOT_ERRORS),$(if $(ENABLE_WERROR),$(if $(PLUGIN_WARNINGS_AS_ERRORS),$(gb_COMPILER_PLUGINS_WARNINGS_AS_ERRORS))),$(gb_CFLAGS_WERROR)) \
$(if $(3),$(gb_COMPILER_PLUGINS_TOOL)) \
$(T_CFLAGS) $(T_CFLAGS_APPEND) \
$(if $(EXTERNAL_CODE),$(gb_CXXFLAGS_Wundef),$(gb_DEFS_INTERNAL)) \
-c $(2) \
$(INCLUDE) \
) endef define gb_ObjCObject__tool_command
$(call gb_Helper_abbreviate_dirs,\
ICECC=no CCACHE_DISABLE=1 \
$(gb_CC) \
$(DEFS) \
$(T_LTOFLAGS) \
$(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
$(if $(WARNINGS_NOT_ERRORS),$(if $(ENABLE_WERROR),$(if $(PLUGIN_WARNINGS_AS_ERRORS),$(gb_COMPILER_PLUGINS_WARNINGS_AS_ERRORS))),$(gb_CFLAGS_WERROR)) \
$(if $(3),$(gb_COMPILER_PLUGINS_TOOL)) \
$(T_OBJCFLAGS) $(T_OBJCFLAGS_APPEND) \
$(if $(EXTERNAL_CODE),$(gb_CXXFLAGS_Wundef),$(gb_DEFS_INTERNAL)) \
-c $(2) \
$(INCLUDE) \
) endef define gb_CxxObject__tool_command
$(call gb_Helper_abbreviate_dirs,\
ICECC=no CCACHE_DISABLE=1 \
$(gb_CXX) \
$(DEFS) \
$(T_LTOFLAGS) \
$(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
$(if $(WARNINGS_NOT_ERRORS),$(if $(ENABLE_WERROR),$(if $(PLUGIN_WARNINGS_AS_ERRORS),$(gb_COMPILER_PLUGINS_WARNINGS_AS_ERRORS))),$(gb_CFLAGS_WERROR)) \
$(if $(3),$(gb_COMPILER_PLUGINS_TOOL)) \
$(T_CXXFLAGS) $(T_CXXFLAGS_APPEND) \
$(if $(EXTERNAL_CODE),$(gb_CXXFLAGS_Wundef),$(gb_DEFS_INTERNAL)) \
-c $(2) \
$(INCLUDE) \
) endef define gb_ObjCxxObject__tool_command
$(call gb_Helper_abbreviate_dirs,\
ICECC=no CCACHE_DISABLE=1 \
$(gb_CXX) \
$(DEFS) \
$(T_LTOFLAGS) \
$(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
$(if $(WARNINGS_NOT_ERRORS),$(if $(ENABLE_WERROR),$(if $(PLUGIN_WARNINGS_AS_ERRORS),$(gb_COMPILER_PLUGINS_WARNINGS_AS_ERRORS))),$(gb_CFLAGS_WERROR)) \
$(if $(3),$(gb_COMPILER_PLUGINS_TOOL)) \
$(T_OBJCXXFLAGS) $(T_OBJCXXFLAGS_APPEND) \
$(if $(EXTERNAL_CODE),$(gb_CXXFLAGS_Wundef),$(gb_DEFS_INTERNAL)) \
-c $(2) \
$(INCLUDE) \
) endef define gb_CxxClrObject__tool_command
$(call gb_Helper_abbreviate_dirs,\
ICECC=no CCACHE_DISABLE=1 \
$(gb_CXX) \
$(DEFS) \
$(T_LTOFLAGS) \
$(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
$(if $(WARNINGS_NOT_ERRORS),$(if $(ENABLE_WERROR),$(if $(PLUGIN_WARNINGS_AS_ERRORS),$(gb_COMPILER_PLUGINS_WARNINGS_AS_ERRORS))),$(gb_CFLAGS_WERROR)) \
$(if $(3),$(gb_COMPILER_PLUGINS_TOOL)) \
$(T_CXXCLRFLAGS) $(T_CXXCLRFLAGS_APPEND) \
$(if $(EXTERNAL_CODE),$(gb_CXXFLAGS_Wundef),$(gb_DEFS_INTERNAL)) \
-c $(2) \
$(INCLUDE) \
) endef
# Overview of dependencies and tasks of LinkTarget # # target task depends on # LinkTarget linking AsmObject CObject CxxObject GenCObject GenCxxObject ObjCObject ObjCxxObject GenObjCObject GenObjCxxObject GenAsmObject GenNasmObject CxxClrObject # LinkTarget/headers # LinkTarget/dep joined dep file AsmObject/dep CObject/dep CxxObject/dep GenCObject/dep GenCxxObject/dep ObjCObject/dep ObjCxxObject/dep GenObjCObject/dep GenObjCxxObject/dep GenAsmObject/dep GenNasmObject/dep CxxClrObject/dep GenCxxClrObject/dep # | LinkTarget/headers # LinkTarget/headers all headers available # including own generated # PCH precompiled headers LinkTarget/headers # CObject plain c compile | LinkTarget/headers # CxxObject c++ compile | LinkTarget/headers PCH # GenCObject plain c compile from | LinkTarget/headers # generated source # GenCxxObject C++ compile from | LinkTarget/headers PCH # generated source # ObjCObject objective c compile | LinkTarget/headers # ObjCxxObject objective c++ compile | LinkTarget/headers # GenObjCObject objective c compile from | LinkTarget/headers # generated source # GenObjCxxObject objective c++ compile from | LinkTarget/headers # generated source # GenAsmObject asm compile from | LinkTarget/headers # generated source # GenNasmObject nasm compile from | LinkTarget/headers # generated source # CxxClrObject C++ CLR compile | LinkTarget/headers # GenCxxClrObject C++ CLR compile from | LinkTarget/headers # generated source # # AsmObject asm compile | LinkTarget # # CObject/dep dependencies these targets generate empty dep files # CxxObject/dep dependencies that are populated upon compile # GenCObject/dep dependencies # GenCxxObject/dep dependencies # ObjCObject/dep dependencies # ObjCxxObject/dep dependencies # GenObjCObject/dep dependencies # GenObjCxxObject/dep dependencies # GenAsmObject/dep dependencies # GenNasmObject/dep dependencies # CxxClrObject/dep dependencies # GenCxxClrObject/dep dependencies # AsmObject/dep dependencies
# LinkTarget/headers means gb_LinkTarget_get_headers_target etc. # dependencies prefixed with | are build-order only dependencies
# check that objects are only linked into one link target: # multiple linking may cause problems because different link targets may # require different compiler flags define gb_Object__owner
$$(if $$(OBJECTOWNER),\
$$(call gb_Output_error,fdo#47246: $(1) is linked in by $$(OBJECTOWNER) $(2)))$(2) endef
# For every object there is a dep file (if gb_FULLDEPS is active). # The dep file depends on the object: the Object__command also updates the # dep file as a side effect. # In the dep file rule just touch it so it's newer than the object.
# Setting FORCE_COMPILE allows forcing compilation for specific sources, # usually used to force running a tool on the sources (see compilerplugins/README). # If set, it'll force all considered sources for rebuild. But it's possible # to explicitly specify gbuild build targets where running of the tool will be skipped # (where 'all' means everything, '-' prepended means to not enable, '/' appended means # everything in the directory; there is no ordering, more specific overrides # more general, and disabling takes precedence). # Example: FORCE_COMPILE="all -sw/ -Library_sc"
# Detect whether forced compile should be used for the given gbuild target. # enable if: no "-TARGET" defined AND [module is enabled OR "TARGET" defined] # call gb_LinkTarget__force_compile,linktargetmakefilename
gb_LinkTarget__force_compile = \
$(and $(if $(filter -$(1),$(FORCE_COMPILE)),,$(true)),\
$(or $(gb_Module_CURRENTMODULE_FORCE_COMPILE),\
$(filter $(1),$(FORCE_COMPILE))))
# This one only exists to force .c/.cxx "rebuilds" when running a compiler tool.
.PHONY: force_compile_target
force_compile_target: ifneq ($(FORCE_COMPILE),)
gb_FORCE_COMPILE_TARGET := force_compile_target endif
# A tool is run either if FORCE_COMPILE is not set (in that case it's always run, # because the target is not up to date), or if FORCE_COMPILE is set then # the tool is run only if the value of FORCE_COMPILE includes the target.
gb_LinkTarget__tool_compile_enabled = \
$(if $(FORCE_COMPILE),$(T_FORCE_COMPILE),$(true))
# Only enable PCH if the PCH_CXXFLAGS and the PCH_DEFS (from the linktarget) # are the same as the T_CXXFLAGS and DEFS we want to use for this object. This # should usually be the case. The DEFS/T_CXXFLAGS would have to be manually # overridden for one object file for them to differ. PCH_CXXFLAGS/PCH_DEFS # should never be overridden on an object -- they should be the same as for the # whole linktarget. In general it should be cleaner to use a static library # compiled with different flags and link that in rather than mixing different # flags in one linktarget. If OBJECT_HAS_EXTRA_CXXFLAGS is set, the object # has explicitly set additional CXXFLAGS, so in that case avoid using the PCH. # T_PCH_EXTRA_CXXFLAGS is used when some object requires extra flags when using # the PCH, but they are intended (gb_PrecompiledHeader_pch_with_obj). define gb_CxxObject__set_pchflags ifneq ($(gb_ENABLE_PCH),) ifneq ($(strip $$(PCH_NAME)),) ifeq ($(OBJECT_HAS_EXTRA_CXXFLAGS),) ifeq ($$(sort $$(PCH_CXXFLAGS) $$(PCH_DEFS)),$$(sort $$(T_CXXFLAGS) $$(T_CXXFLAGS_APPEND) $$(DEFS)))
$$@ : PCHFLAGS := $$(call gb_PrecompiledHeader_get_enableflags,$$(PCH_NAME),$$(PCH_LINKTARGETMAKEFILENAME),$$(PCH_HEADER)) $$(T_PCH_EXTRA_CXXFLAGS) else
$$(warning No precompiled header available for $$*.cxx .)
$$(info precompiled header flags : $$(sort $$(PCH_CXXFLAGS) $$(PCH_DEFS)))
$$(info . object flags : $$(sort $$(T_CXXFLAGS) $$(T_CXXFLAGS_APPEND) $$(DEFS)))
$$(error Incorrect precompiled header setup or internal gbuild error.)
$$@ : PCHFLAGS := endif endif endif endif endef
# XXX: This is more complicated than necessary, but we cannot just use # the generated C++ file as the main target, because we need to let the # header depend on that to ensure the header is present before anything # tries to use it.
# Target for the .exports of the shared library, to speed up incremental build. # This deliberately does nothing if the file exists; the file is actually # written in gb_LinkTarget__command_dynamiclink. # Put this pattern rule here so it overrides the one below. # (this is rather ugly: because of % the functions cannot be used)
$(gb_Library_DLLDIR)/%.exports :
$(if $(wildcard $@),,mkdir -p $(dir $@) && touch $@)
# This recipe actually also builds the dep-target as a side-effect, which # is an optimization to reduce incremental build time. # (with exception for concat-dep executable itself which does not exist yet...)
$(WORKDIR)/LinkTarget/% : $(gb_Helper_MISCDUMMY)
$(call gb_LinkTarget__command_impl,$@,$*)
# Ok, this is some dark voodoo: When declaring a linktarget with # gb_LinkTarget_LinkTarget we set SELF in the headertarget to name of the # target. When the rule for the headertarget is executed and SELF does not # match the target name, we are depending on a linktarget that was never # declared. In a full build exclusively in gbuild that should never happen. define gb_LinkTarget__get_headers_check ifneq ($$(SELF),$$*)
$$(eval $$(call gb_Output_error,used LinkTarget $$* not defined)) endif
$$@ : COMMAND := $$(call gb_Helper_abbreviate_dirs, touch $$@)
# sadly because of the subdirectories can't have pattern deps on .dir here
$(WORKDIR)/Headers/% :
$(eval $(gb_LinkTarget__get_headers_check))
$(COMMAND)
# Explanation of some of the targets: # - gb_LinkTarget_get_headers_target is the target that guarantees all headers # from the linked against libraries and the linktargets own generated headers # are generated. # - gb_LinkTarget_get_target links the objects into a file in WORKDIR. # gb_LinkTarget_get_target depends on gb_LinkTarget_get_headers_target. # gb_LinkTarget_get_target depends additionally on the objects, which in turn # depend build-order only on the gb_LinkTarget_get_headers_target. The build # order-only dependency ensures all headers to be there for compiling and # dependency generation without causing all objects to be rebuild when one # header changes. Only the ones with an explicit dependency in their generated # dependency file will be rebuild. # # gb_LinkTarget_get_target is the target that links the objects into a file in # WORKDIR # Explanation of some of the variables: # - AUXTARGETS are the additionally generated files that need to be cleaned out # on clean. # - PCH_CXXFLAGS and PCH_DEFS are the flags that the precompiled headers will # be compiled with. They should never be overridden in a single object # files. # - TARGETTYPE is the type of linktarget as some platforms need very different # command to link different targettypes. # - LIBRARY_X64 is only relevant for building a x64 library on windows. # - PE_X86 is only relevant for building a x86 binaries on Windows. # # Since most variables are set on the linktarget and not on the object, the # object learns about these setting via GNU makes scoping of target variables. # Therefore it is important that objects are only directly depended on by the # linktarget. This for example means that you cannot build a single object # alone, because then you would directly depend on the object. # # A note about flags: because the overriding the global variables with a target # local variable of the same name is considered obscure, the target local # variables have a T_ prefix. # # call gb_LinkTarget_LinkTarget,linktarget,linktargetmakefilename,layer define gb_LinkTarget_LinkTarget
$(call gb_LinkTarget_get_clean_target,$(1)) : LINKTARGET := $(1)
$(call gb_LinkTarget_get_clean_target,$(1)) : LINKTARGETMAKEFILENAME := $(2)
$(call gb_LinkTarget_get_clean_target,$(1)) : AUXTARGETS :=
$(call gb_LinkTarget_get_headers_target,$(1)) : SELF := $(call gb_LinkTarget__get_workdir_linktargetname,$(1))
$(call gb_LinkTarget_get_headers_target,$(1)) : \
| $(dir $(call gb_LinkTarget_get_headers_target,$(1))).dir \
$(dir $(call gb_LinkTarget_get_target,$(1))).dir \
$(dir $(WORKDIR)/LinkTarget/$(call gb_LinkTarget__get_workdir_linktargetname,$(1))).dir
$(call gb_LinkTarget_get_target,$(1)) : ILIBTARGET :=
$(call gb_LinkTarget_get_clean_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : COBJECTS :=
$(call gb_LinkTarget_get_clean_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : CXXOBJECTS :=
$(call gb_LinkTarget_get_clean_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : YACCOBJECT :=
$(call gb_LinkTarget_get_target,$(1)) : T_YACCFLAGS := $$(gb_LinkTarget_YYACFLAGS) $(YACCFLAGS)
$(call gb_LinkTarget_get_clean_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : LEXOBJECT :=
$(call gb_LinkTarget_get_target,$(1)) : T_LEXFLAGS := $$(gb_LinkTarget_LEXFLAGS) $(LEXFLAGS)
$(call gb_LinkTarget_get_clean_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : OBJCOBJECTS :=
$(call gb_LinkTarget_get_clean_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : OBJCXXOBJECTS :=
$(call gb_LinkTarget_get_clean_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : CXXCLROBJECTS :=
$(call gb_LinkTarget_get_clean_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : ASMOBJECTS :=
$(call gb_LinkTarget_get_clean_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : GENCOBJECTS :=
$(call gb_LinkTarget_get_clean_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : GENCXXOBJECTS :=
$(call gb_LinkTarget_get_clean_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : GENOBJCOBJECTS :=
$(call gb_LinkTarget_get_clean_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : GENASMOBJECTS :=
$(call gb_LinkTarget_get_clean_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : GENNASMOBJECTS :=
$(call gb_LinkTarget_get_clean_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : GENOBJCXXOBJECTS :=
$(call gb_LinkTarget_get_clean_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : GENCXXCLROBJECTS :=
$(call gb_LinkTarget_get_target,$(1)) : T_CFLAGS := $$(gb_LinkTarget_CFLAGS)
$(call gb_LinkTarget_get_target,$(1)) : T_CFLAGS_APPEND :=
$(call gb_LinkTarget_get_target,$(1)) : T_CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS)
$(call gb_LinkTarget_get_target,$(1)) : T_CXXFLAGS_APPEND :=
$(call gb_LinkTarget_get_target,$(1)) : PCH_CXXFLAGS := $$(gb_LinkTarget_CXXFLAGS)
$(call gb_LinkTarget_get_target,$(1)) : OBJECT_HAS_EXTRA_CXXFLAGS :=
$(call gb_LinkTarget_get_target,$(1)) : T_OBJCXXFLAGS := $$(gb_LinkTarget_OBJCXXFLAGS)
$(call gb_LinkTarget_get_target,$(1)) : T_OBJCXXFLAGS_APPEND :=
$(call gb_LinkTarget_get_target,$(1)) : T_OBJCFLAGS := $$(gb_LinkTarget_OBJCFLAGS)
$(call gb_LinkTarget_get_target,$(1)) : T_OBJCFLAGS_APPEND :=
$(call gb_LinkTarget_get_target,$(1)) : T_NASMFLAGS := $$(NAFLAGS)
$(call gb_LinkTarget_get_target,$(1)) : T_NASMFLAGS_APPEND :=
$(call gb_LinkTarget_get_target,$(1)) : T_CXXCLRFLAGS := $$(gb_LinkTarget_CXXCLRFLAGS)
$(call gb_LinkTarget_get_target,$(1)) : T_CXXCLRFLAGS_APPEND :=
$(call gb_LinkTarget_get_target,$(1)) : DEFS := $$(gb_LinkTarget_DEFAULTDEFS) $(CPPFLAGS)
$(call gb_LinkTarget_get_target,$(1)) : PCH_DEFS := $$(gb_LinkTarget_DEFAULTDEFS) $(CPPFLAGS)
$(call gb_LinkTarget_get_target,$(1)) : INCLUDE := -I$$(SRCDIR)/include $$(gb_LinkTarget_INCLUDE)
$(call gb_LinkTarget_get_target,$(1)) : T_LDFLAGS := $$(gb_LinkTarget_LDFLAGS) $(call gb_LinkTarget_get_linksearchpath_for_layer,$(3)) $(call gb_LinkTarget__get_ldflags,$(2))
$(call gb_LinkTarget_get_target,$(1)) : LINKED_LIBS :=
$(call gb_LinkTarget_get_target,$(1)) : LINKED_STATIC_LIBS :=
$(call gb_LinkTarget_get_target,$(1)) : T_LIBS :=
$(call gb_LinkTarget_get_target,$(1)) : T_STDLIBS_CXX := $(gb_STDLIBS_CXX)
$(call gb_LinkTarget_get_target,$(1)) : TARGETTYPE :=
$(call gb_LinkTarget_get_target,$(1)) : LIBRARY_X64 :=
$(call gb_LinkTarget_get_target,$(1)) : PCH_NAME :=
$(call gb_LinkTarget_get_target,$(1)) : PCH_HEADER :=
$(call gb_LinkTarget_get_target,$(1)) : PCH_LINKTARGETMAKEFILENAME :=
$(call gb_LinkTarget_get_target,$(1)) : PCHOBJS :=
$(call gb_LinkTarget_get_target,$(1)) : PCHOBJEX :=
$(call gb_LinkTarget_get_target,$(1)) : PCHOBJNOEX :=
$(call gb_LinkTarget_get_target,$(1)) : T_PCH_EXTRA_CXXFLAGS :=
$(call gb_LinkTarget_get_target,$(1)) : PE_X86 :=
$(call gb_LinkTarget_get_target,$(1)) : PDBFILE :=
$(call gb_LinkTarget_get_target,$(1)) : TARGETGUI :=
$(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)) : WARNINGS_DISABLED :=
$(call gb_LinkTarget_get_target,$(1)) : PLUGIN_WARNINGS_AS_ERRORS :=
$(call gb_LinkTarget_get_target,$(1)) : EXTERNAL_CODE :=
$(call gb_LinkTarget_get_target,$(1)) : SOVERSIONSCRIPT :=
$(call gb_LinkTarget_get_target,$(1)) : COMPILER_TEST :=
$(call gb_LinkTarget_get_target,$(1)) : T_SYMBOLS := $(if $(call gb_target_symbols_enabled,$(2)),$(true),$(false))
$(call gb_LinkTarget_get_target,$(1)) : T_FORCE_COMPILE := $(if $(call gb_LinkTarget__force_compile,$(2)),$(true),$(false))
$(call gb_LinkTarget_get_target,$(1)) : T_CC :=
$(call gb_LinkTarget_get_target,$(1)) : T_CXX :=
$(call gb_LinkTarget_get_target,$(1)) : T_USE_LD := $(USE_LD)
$(call gb_LinkTarget_get_target,$(1)) : T_LTOFLAGS := $(gb_LTOFLAGS)
$(call gb_LinkTarget_get_target,$(1)) : T_PREJS :=
# remove platform specific standard libraries for linktarget $(1) # assumption is that adding these standard libs is always useful, but in very # exceptional cases this disable method may be used # call gb_LinkTarget_disable_standard_system_libs,linktarget define gb_LinkTarget_disable_standard_system_libs
$(call gb_LinkTarget_get_target,$(1)) : T_LIBS := $$(filter-out $$(gb_STDLIBS),$$(T_LIBS))
$(call gb_LinkTarget_get_target,$(1)) : T_STDLIBS_CXX :=
define gb_PrintDeps_info
$(info LibraryDep: $(1) links against $(2)) endef
# returns $(true), if the target class really calls a linker. # call gb_LinkTarget_does_real_link,linktarget
gb_LinkTarget_does_real_link = $(if $(filter Executable CppunitTest $(if $(DISABLE_DYNLOADING),,Library), \
$(call gb_LinkTarget__get_workdir_linktargetclass,$(1))),$(true))
# avoid problem when a module is built partially but other modules that define # needed libraries is not yet built: prevent invocation of pattern rule # for library with invalid parameters by depending on the header target define gb_LinkTarget__lib_dummy_depend
$(call gb_Library_get_target,$(1)) :| $(call gb_Library_get_headers_target,$(1))
ifeq (,$(DISABLE_DYNLOADING)) # depend on the exports of the library, not on the library itself # for faster incremental builds when the ABI is unchanged. # export files are created from the library, so this also ensures the library exists.
$(foreach lib,$(call gb_LinkTarget__filter_lo_libraries,$(3)),$(if $(filter $(lib),$(gb_Library_KNOWNLIBS)), \
$$(eval $(call gb_LinkTarget_get_target,$(1)) : $(call gb_Library_get_exports_target,$(lib))) \
))
else# DISABLE_DYNLOADING # depend on the now-static libraries themself, but only if the target actually links to it ifneq (,$(call gb_LinkTarget_does_real_link,$(1)))
$(call gb_LinkTarget_get_target,$(1)) : T_LIBS += $(call gb_LinkTarget__filter_sys_libraries,$(3))
$(if $(filter-out Library,gb_LinkTarget__get_workdir_linktargetclass,$(1)), \
$(foreach lib,$(call gb_LinkTarget__filter_lo_libraries,$(3)),$(if $(filter $(lib),$(gb_Library_KNOWNLIBS)), \
$$(eval $(call gb_LinkTarget_get_target,$(1)) : $(call gb_Library_get_linktarget_target,$(lib))) \
))) endif endif# DISABLE_DYNLOADING
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.