From 7a80b68cb0b279a1b43f769169aaf2a2659dc150 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 14 Nov 2022 20:16:41 +0100 Subject: WASM gbuild: write link dependencies into a file $@.linkdeps The static build was added in commit dc9ccf3d8f294cd7ae9d5bece7b6c16c3b22f6a5 and commit b04be559ddf4a7f0a5cdc0b9abc2bcfc4aae25cc and there are several files written to workdir/LinkTarget/*/*.d.{libraries,externals,statics} that list all the (recursive) dependencies of a LinkTarget. Unfortunately the content of these files requires gbuild to interpret, because it's using the Library names which may not map 1:1 to file names, not to mention "externals"; this is all resolved by calls to gb_LinkTarget_use_* anyway. To get a command line that's usable outside of gbuild, write another file $@.linkdeps as a side effect of gb_LinkTarget__command_dynamiclink. Change-Id: I94f31142413561dcdb56fa722a4517f84fcd7d61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143393 Reviewed-by: Michael Stahl Tested-by: Jenkins --- solenv/gbuild/platform/unxgcc.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'solenv/gbuild/platform/unxgcc.mk') diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index cc377a5b4309..5e971bd8944c 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -152,10 +152,12 @@ $(call gb_Helper_abbreviate_dirs,\ $(foreach extraobjectlist,$(EXTRAOBJECTLISTS),`cat $(extraobjectlist)`) \ $(if $(filter TRUE,$(DISABLE_DYNLOADING)), \ -Wl$(COMMA)--start-group \ - $(patsubst lib%.a,-l%,$(patsubst lib%.so,-l%,$(patsubst %.$(gb_Library_UDK_MAJORVER),%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))))) \ - $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) \ - $(patsubst $(gb_LinkTarget__syslib),%,$(T_LIBS)) \ - $(if $(call gb_LinkTarget__NeedsCxxLinker),$(T_STDLIBS_CXX)) \ + $(shell echo -n \ + $(patsubst lib%.a,-l%,$(patsubst lib%.so,-l%,$(patsubst %.$(gb_Library_UDK_MAJORVER),%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))))) \ + $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) \ + $(patsubst $(gb_LinkTarget__syslib),%,$(T_LIBS)) \ + $(if $(call gb_LinkTarget__NeedsCxxLinker),$(T_STDLIBS_CXX)) \ + | tee $@.linkdeps) \ -Wl$(COMMA)--end-group \ , \ -Wl$(COMMA)--start-group \ -- cgit