xpcom/xpcom-private.h.in
author Mike Hommey <mh+mozilla@glandium.org>
Sat, 04 Oct 2014 10:33:00 +0900
changeset 208801 d959a6081ceacde13d41b8a4ee192c912c85ef02
parent 103817 1ffa5cb41f5453e19ef54d4baaef56bd07e23ffe
permissions -rw-r--r--
Bug 1077151 - Always use expandlibs descriptors when they exist. r=mshal Currently, when there is both an expandlibs descriptor and an actual static library, expandlibs picks the static library. This has the side effect that if there are object files in the static library that aren't directly used, they're dropped when linking, even when they export symbols that would be exported in the final linked binary. In most cases in the code base, files are not dropped that way. The most notable counter-example is xpcomglue, where actually not dropping files leads to link failure because of missing symbols those files reference (yes, that would tend to say the glue is broken in some way). On the opposite side, there is mozglue, which does have both a descriptor and a static library (the latter being necessary for the SDK), and that linking as a static library drops files that shouldn't be dropped (like jemalloc). We're currently relying on -Wl,--whole-archive for those files not to be dropped, but that won't really be possible without much hassle in a world where mozglue dependencies live in moz.build land. Switching expandlibs to use descriptors when they exist, even when there is a static library (so, the opposite of the current behavior) allows to drop -Wl,--whole-archive and prepare for a better future. However, as mentioned, xpcomglue does still require to be linked through the static library, so we need to make it a static library only. To achieve that, we make NO_EXPAND_LIBS now actually mean no expandlibs and use that to build the various different xpcomglues.

/* 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/. */

/* The following defines are only used by the xpcom implementation */

#ifndef _XPCOM_PRIVATE_H_
#define _XPCOM_PRIVATE_H_

/* Define if getpagesize() is available */
#undef HAVE_GETPAGESIZE

/* Define if iconv() is available */
#undef HAVE_ICONV

/* Define if iconv() supports const input */
#undef HAVE_ICONV_WITH_CONST_INPUT

/* Define if mbrtowc() is available */
#undef HAVE_MBRTOWC

/* Define if wcrtomb() is available */
#undef HAVE_WCRTOMB

/* Define if statvfs64() is available */
#undef HAVE_STATVFS64

/* Define if statvfs() is available */
#undef HAVE_STATVFS

/* Define if statfs64() is available */
#undef HAVE_STATFS64

/* Define if statfs() is available */
#undef HAVE_STATFS

/* Define if <sys/statvfs.h> is present */
#undef HAVE_SYS_STATVFS_H

/* Define if <sys/statfs.h> is present */
#undef HAVE_SYS_STATFS_H

/* Define if <sys/vfs.h> is present */
#undef HAVE_SYS_VFS_H

/* Define if <sys/mount.h> is present */
#undef HAVE_SYS_MOUNT_H

#endif /* _XPCOM_PRIVATE_H_ */