WASM gbuild: add --pre-js dependencies
Currently includes environment.js for general environment settings and soffice_args.js for soffice command line flags. Change-Id: I1166c5a9ae53c56a69b9223c865b4df525d07450 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128590 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
This commit is contained in:
parent
f090004c5f
commit
a27296ded7
@ -27,6 +27,8 @@ $(eval $(call gb_Executable_add_cobjects,soffice_bin,\
|
||||
desktop/source/app/main \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Executable_add_prejs,soffice_bin,$(SRCDIR)/static/emscripten/soffice_args.js))
|
||||
|
||||
ifeq ($(OS),WNT)
|
||||
|
||||
$(eval $(call gb_Executable_set_targettype_gui,soffice_bin,NO))
|
||||
|
@ -491,5 +491,6 @@ gb_CppunitTest_use_clang = $(call gb_CppunitTest__forward_to_Linktarget,$(0),$(1
|
||||
gb_CppunitTest_set_clang_precompiled_header = $(call gb_CppunitTest__forward_to_Linktarget,$(0),$(1),$(2),$(3))
|
||||
gb_CppunitTest_use_glxtest = $(call gb_CppunitTest__forward_to_Linktarget,$(0),$(1),$(2),$(3))
|
||||
gb_CppunitTest_use_vclmain = $(call gb_CppunitTest__forward_to_Linktarget,$(0),$(1),$(2),$(3))
|
||||
gb_CppunitTest_add_prejs = $(call gb_CppunitTest__forward_to_Linktarget,$(0),$(1),$(2),$(3))
|
||||
|
||||
# vim: set noet sw=4:
|
||||
|
@ -156,6 +156,7 @@ gb_Executable_use_clang = $(call gb_Executable__forward_to_Linktarget,$(0),$(1),
|
||||
gb_Executable_set_clang_precompiled_header = $(call gb_Executable__forward_to_Linktarget,$(0),$(1),$(2),$(3))
|
||||
gb_Executable_use_glxtest = $(call gb_Executable__forward_to_Linktarget,$(0),$(1),$(2),$(3))
|
||||
gb_Executable_use_vclmain = $(call gb_Executable__forward_to_Linktarget,$(0),$(1),$(2),$(3))
|
||||
gb_Executable_add_prejs = $(call gb_Executable__forward_to_Linktarget,$(0),$(1),$(2),$(3))
|
||||
|
||||
# Run-time use
|
||||
|
||||
|
@ -1067,6 +1067,7 @@ $(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 :=
|
||||
|
||||
ifeq ($(gb_FULLDEPS),$(true))
|
||||
ifeq (depcache:,$(filter depcache,$(.FEATURES)):$(gb_PARTIAL_BUILD))
|
||||
@ -2276,4 +2277,13 @@ endef
|
||||
# call gb_LinkTarget__set_plugin_for_nodep,linktarget,loader
|
||||
gb_LinkTarget__set_plugin_for_nodep = $(call gb_LinkTarget__set_plugin_for,$(1),$(2),$(true))
|
||||
|
||||
# call gb_LinkTarget_add_prejs,linktarget,js_file
|
||||
define gb_LinkTarget_add_prejs
|
||||
ifeq (EMSCRIPTEN,$(OS))
|
||||
$(call gb_LinkTarget_get_target,$(1)) : T_PREJS += $(2)
|
||||
$(call gb_LinkTarget_get_target,$(1)) : $(2)
|
||||
endif
|
||||
|
||||
endef
|
||||
|
||||
# vim: set noet sw=4:
|
||||
|
@ -11,6 +11,10 @@ gb_UnoApiHeadersTarget_select_variant = $(if $(filter udkapi,$(1)),comprehensive
|
||||
|
||||
include $(GBUILDDIR)/platform/unxgcc.mk
|
||||
|
||||
# don't sort; later can override previous settings!
|
||||
gb_EMSCRIPTEN_PRE_JS_FILES = \
|
||||
$(SRCDIR)/static/emscripten/environment.js \
|
||||
|
||||
gb_RUN_CONFIGURE := $(SRCDIR)/solenv/bin/run-configure
|
||||
# avoid -s SAFE_HEAP=1 - c.f. gh#8584 this breaks source maps
|
||||
gb_EMSCRIPTEN_CPPFLAGS := -pthread -s USE_PTHREADS=1
|
||||
@ -53,6 +57,8 @@ $(call gb_LinkTarget_add_auxtargets,$(2),\
|
||||
$(patsubst %.lib,%.worker.js,$(3)) \
|
||||
)
|
||||
|
||||
$(foreach pre_js,$(gb_EMSCRIPTEN_PRE_JS_FILES),$(call gb_Executable_add_prejs,$(1),$(pre_js)))
|
||||
|
||||
endef
|
||||
|
||||
define gb_CppunitTest_CppunitTest_platform
|
||||
@ -62,6 +68,8 @@ $(call gb_LinkTarget_add_auxtargets,$(2),\
|
||||
$(patsubst %.lib,%.worker.js,$(3)) \
|
||||
)
|
||||
|
||||
$(foreach pre_js,$(gb_EMSCRIPTEN_PRE_JS_FILES),$(call gb_CppunitTest_add_prejs,$(1),$(pre_js)))
|
||||
|
||||
endef
|
||||
|
||||
gb_SUPPRESS_TESTS := $(true)
|
||||
|
@ -138,7 +138,7 @@ $(call gb_Helper_abbreviate_dirs,\
|
||||
$(if $(SOVERSIONSCRIPT),-Wl$(COMMA)--soname=$(notdir $(1)) \
|
||||
-Wl$(COMMA)--version-script=$(SOVERSIONSCRIPT)) \
|
||||
$(subst \d,$$,$(RPATH)) \
|
||||
$(T_USE_LD) $(T_LDFLAGS) \
|
||||
$(T_USE_LD) $(T_LDFLAGS) $(foreach pre_js,$(T_PREJS), --pre-js $(pre_js)) \
|
||||
$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
|
||||
$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
|
||||
$(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \
|
||||
|
5
static/emscripten/environment.js
Normal file
5
static/emscripten/environment.js
Normal file
@ -0,0 +1,5 @@
|
||||
if (!('preRun' in Module)) Module['preRun'] = [];
|
||||
Module.preRun.push(function() {
|
||||
ENV.SAL_LOG = "+WARN"
|
||||
ENV.SAL_VCL_QT5_USE_CAIRO = "1"
|
||||
});
|
6
static/emscripten/soffice_args.js
Normal file
6
static/emscripten/soffice_args.js
Normal file
@ -0,0 +1,6 @@
|
||||
Module['arguments'] = [
|
||||
'--norestore',
|
||||
'--nologo',
|
||||
'--writer',
|
||||
'/android/default-document/example.odt'
|
||||
];
|
Loading…
x
Reference in New Issue
Block a user