Avoid potential negative array index access to cached text.
[LibreOffice.git] / desktop / Executable_soffice_bin.mk
blobc2d811c2e86c6f8c9720c5e05026353df25f0707
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 $(eval $(call gb_Executable_Executable,soffice_bin))
12 $(eval $(call gb_Executable_set_include,soffice_bin,\
13 $$(INCLUDE) \
14 -I$(SRCDIR)/desktop/source/inc \
17 $(eval $(call gb_Executable_add_defs,soffice_bin,\
18 $(if $(DISABLE_DYNLOADING),$(if $(SYSTEM_LIBXML),,-DNOTEST_xmlCleanupParser)) \
21 $(eval $(call gb_Executable_use_libraries,soffice_bin,\
22 sal \
23 sofficeapp \
26 $(eval $(call gb_Executable_add_cobjects,soffice_bin,\
27 desktop/source/app/main \
30 $(eval $(call gb_Executable_add_prejs,soffice_bin,$(SRCDIR)/static/emscripten/soffice_args.js))
32 ifeq ($(OS),WNT)
34 $(eval $(call gb_Executable_set_targettype_gui,soffice_bin,NO))
36 $(eval $(call gb_Executable_add_nativeres,soffice_bin,sofficebin/officeloader))
38 $(eval $(call gb_Executable_add_default_nativeres,soffice_bin,$(PRODUCTNAME)))
40 ifeq ($(COM),MSC)
42 $(eval $(call gb_Executable_add_ldflags,soffice_bin,\
43 /STACK:10000000 \
46 endif
48 endif
50 ifeq ($(OS),EMSCRIPTEN)
51 $(call gb_LinkTarget_get_target,$(call gb_Executable_get_linktarget,soffice_bin)) : $(call gb_StaticLibrary_get_linktarget_target,unoembind)
52 $(call gb_LinkTarget_get_headers_target,$(call gb_Executable_get_linktarget,soffice_bin)) : $(call gb_StaticLibrary_get_headers_target,unoembind)
53 $(call gb_LinkTarget__static_lib_dummy_depend,unoembind)
55 $(eval $(call gb_Executable_add_ldflags,soffice_bin,\
56 -s EXPORTED_FUNCTIONS=["_main"$(COMMA)"_libreofficekit_hook"$(COMMA)"_libreofficekit_hook_2"$(COMMA)"_lok_preinit"$(COMMA)"_lok_preinit_2"] -Wl$(COMMA)--whole-archive $(call gb_StaticLibrary_get_target,unoembind) -Wl$(COMMA)--no-whole-archive \
59 endif
61 # vim: set ts=4 sw=4 et: