Kaydet (Commit) ddc7bb62 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Poor hack for libjpipe.so under Clang -fsanitize=*

Change-Id: I5c1036448cfc543f55cf1aa303abcfda6a64f64e
üst 0ba251fb
...@@ -21,7 +21,7 @@ $(eval $(call gb_Library_add_cobjects,jpipe,\ ...@@ -21,7 +21,7 @@ $(eval $(call gb_Library_add_cobjects,jpipe,\
jurt/source/pipe/wrapper/wrapper \ jurt/source/pipe/wrapper/wrapper \
)) ))
else else ifeq ($(COM_GCC_IS_CLANG)$(filter -fsanitize=%,%(gb_CC)),)
$(eval $(call gb_Library_use_libraries,jpipe,\ $(eval $(call gb_Library_use_libraries,jpipe,\
sal \ sal \
...@@ -31,6 +31,49 @@ $(eval $(call gb_Library_add_cobjects,jpipe,\ ...@@ -31,6 +31,49 @@ $(eval $(call gb_Library_add_cobjects,jpipe,\
jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection \ jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection \
)) ))
else
# HACK for Clang -fsanitize=address etc. to build libjpipe.so (dlopen'ed from
# java executable) without dependence on __asan_* etc. symbols (expected to be
# provided by the executable), incl. statically linking in the relevant parts of
# sal:
$(eval $(call gb_Library_add_cobjects,jpipe, \
jurt/source/pipe/com_sun_star_lib_connections_pipe_PipeConnection \
jurt/source/pipe/staticsalhack_c \
))
$(eval $(call gb_Library_add_exception_objects,jpipe, \
jurt/source/pipe/staticsalhack_cxx \
))
$(eval $(call gb_Library_add_defs,jpipe, \
-DRTL_OS="\"$(RTL_OS)"\" \
-DRTL_ARCH="\"$(RTL_ARCH)"\" \
))
$(eval $(call gb_Library_set_include,jpipe, \
$$(INCLUDE) \
-I$(SRCDIR) \
-I$(SRCDIR)/sal/inc \
-I$(SRCDIR)/sal/osl/unx \
-I$(SRCDIR)/sal/rtl \
-I$(SRCDIR)/sal/textenc \
))
$(eval $(call gb_Library_use_externals,jpipe, \
boost_headers \
))
$(eval $(call gb_Library_add_libs,jpipe, \
$(if $(filter-out $(OS),ANDROID),-lpthread) \
))
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,jpipe)): \
gb_CC := $(filter-out -fsanitize=%,$(gb_CC))
$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,jpipe)): \
gb_CXX := $(filter-out -fsanitize=%,$(gb_CXX))
endif endif
# vim:set noet sw=4 ts=4: # vim:set noet sw=4 ts=4:
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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/.
*/
#define DISABLE_DYNLOADING
#define FORCE_SYSALLOC
#define NO_CHILD_PROCESSES
#undef SAL_LOG_INFO
#undef SAL_LOG_WARN
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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/.
*/
#include <staticsalhack.h>
#include <sal/osl/unx/memory.c>
#include <sal/osl/unx/mutex.c>
#include <sal/osl/unx/nlsupport.c>
#include <sal/osl/unx/pipe.c>
#include <sal/osl/unx/readwrite_helper.c>
#include <sal/osl/unx/thread.c>
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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/.
*/
#include <staticsalhack.h>
#include <sal/rtl/string.cxx>
#undef IMPL_RTL_EMPTYSTRING
#undef IMPL_RTL_STRCODE
#undef IMPL_RTL_STRINGDATA
#undef IMPL_RTL_STRINGNAME
#undef IMPL_RTL_STRNAME
#undef IMPL_RTL_USTRCODE
#undef RTL_LOG_STRING_BITS
#include <sal/rtl/ustring.cxx>
#include <sal/osl/unx/conditn.cxx>
#include <sal/osl/unx/file.cxx>
#include <sal/osl/unx/file_error_transl.cxx>
#include <sal/osl/unx/file_misc.cxx>
#include <sal/osl/unx/file_path_helper.cxx>
#include <sal/osl/unx/file_stat.cxx>
#include <sal/osl/unx/file_url.cxx>
#include <sal/osl/unx/module.cxx>
#include <sal/osl/unx/process.cxx>
#include <sal/osl/unx/process_impl.cxx>
#include <sal/osl/unx/profile.cxx>
#include <sal/osl/unx/security.cxx>
#include <sal/osl/unx/uunxapi.cxx>
#include <sal/rtl/alloc_arena.cxx>
#include <sal/rtl/alloc_cache.cxx>
#include <sal/rtl/alloc_fini.cxx>
#include <sal/rtl/alloc_global.cxx>
#include <sal/rtl/bootstrap.cxx>
#include <sal/rtl/byteseq.cxx>
#include <sal/rtl/hash.cxx>
#include <sal/rtl/locale.cxx>
#include <sal/rtl/math.cxx>
#include <sal/rtl/strbuf.cxx>
#include <sal/rtl/strimp.cxx>
#include <sal/rtl/uri.cxx>
#include <sal/rtl/ustrbuf.cxx>
#include <sal/textenc/converter.cxx>
#include <sal/textenc/convertsimple.cxx>
#include <sal/textenc/handleundefinedunicodetotextchar.cxx>
#include <sal/textenc/tcvtutf8.cxx>
#include <sal/textenc/tencinfo.cxx>
#include <sal/textenc/textcvt.cxx>
#include <sal/textenc/textenc.cxx>
#include <sal/textenc/unichars.cxx>
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment