build all solenv build tools always as optimized
[LibreOffice.git] / jurt / Library_jpipe.mk
blob2c1b2f5f380c73169218a8a69a95ed1e924c4de6
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_Library_Library,jpipe))
12 ifeq ($(OS),WNT)
14 # The real library is called jpipx on Windows. We build only a wrapper
15 # for it here.
16 $(eval $(call gb_Library_add_cobjects,jpipe,\
17 jurt/source/pipe/wrapper/wrapper \
20 else
22 ifeq ($(COM_IS_CLANG),TRUE)
23 ifneq ($(filter -fsanitize=%,$(gb_CC)),)
24 Library_jpipe__staticsalhack = TRUE
25 endif
26 endif
28 ifeq ($(Library_jpipe__staticsalhack),)
30 $(eval $(call gb_Library_use_libraries,jpipe,\
31 sal \
34 $(eval $(call gb_Library_add_cobjects,jpipe,\
35 jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection \
38 else
40 # HACK for Clang -fsanitize=address etc. to build libjpipe.so (dlopen'ed from
41 # java executable) without dependence on __asan_* etc. symbols (expected to be
42 # provided by the executable), incl. statically linking in the relevant parts of
43 # sal:
45 $(eval $(call gb_Library_add_cobjects,jpipe, \
46 jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection \
49 # see external/dtoa/StaticLibrary_dtoa.mk
50 $(eval $(call gb_Library_add_defs,jpipe,\
51 $(if $(filter little,$(ENDIANNESS)),-DIEEE_8087,-DIEEE_MC68k)\
54 $(eval $(call gb_Library_add_exception_objects,jpipe, \
55 jurt/source/pipe/staticsalhack \
58 $(eval $(call gb_Library_add_defs,jpipe, \
59 -DRTL_OS="\"$(RTL_OS)"\" \
60 -DRTL_ARCH="\"$(RTL_ARCH)"\" \
63 $(eval $(call gb_Library_set_include,jpipe, \
64 $$(INCLUDE) \
65 -I$(SRCDIR) \
66 -I$(SRCDIR)/sal/inc \
67 -I$(SRCDIR)/sal/osl/unx \
68 -I$(SRCDIR)/sal/rtl \
69 -I$(SRCDIR)/sal/textenc \
70 -I$(call gb_UnpackedTarball_get_dir,dtoa) \
71 -I$(call gb_UnpackedTarball_get_dir,dtoa/include) \
74 $(eval $(call gb_Library_use_externals,jpipe, \
75 boost_headers \
78 ifeq ($(OS),MACOSX)
79 $(eval $(call gb_Library_use_system_darwin_frameworks,jpipe, \
80 CoreFoundation \
82 endif
84 $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,jpipe)): \
85 $(call gb_UnpackedTarball_get_target,dtoa)
86 $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,jpipe)): \
87 gb_CC := $(filter-out -fsanitize%,$(gb_CC))
88 $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,jpipe)): \
89 gb_CXX := $(filter-out -fsanitize%,$(gb_CXX))
91 endif
92 endif
94 # vim:set noet sw=4 ts=4: