summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2019-06-20 13:00:37 +0000
committerJoe Orton <jorton@apache.org>2019-06-20 13:00:37 +0000
commit50bbfb3de58e82514f50a34f2ec24d147112b7f5 (patch)
tree8b983073a3f756f57b81d724d0d44fe35d56d8eb /server
parent314fb18f15ceb32589e40224257faeac6c8768b2 (diff)
downloadhttpd-50bbfb3de58e82514f50a34f2ec24d147112b7f5.tar.gz
Add an --enable-reduced-exports configure option to link libmain.a
using ld's --whole-archive mode and avoid building exports.c entirely. This reduces the size of a minimal httpd binary by 18% on Linux/x86_64 (687K to 560K) with no difference to the set of symbols available to modules. This option is only appropriate to use if using a shared libapr* build, hence is non-default. * configure.in: Add --enable-reduced-exports; disable httpdunit build if used. Define AP_FORCE_EXPORTS if not enabled (default) in place of AP_USING_AUTOCONF. * server/main.c (ap_suck_in_APR): Only build if AP_FORCE_EXPORTS is defined. * Makefile.in: Link libmain.la using LIBMAIN_LIB. * server/Makefile.in: Conditionally build exports.c into libmain. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1861685 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r--server/Makefile.in2
-rw-r--r--server/main.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/server/Makefile.in b/server/Makefile.in
index e77efbacb9..7786f656be 100644
--- a/server/Makefile.in
+++ b/server/Makefile.in
@@ -12,7 +12,7 @@ LTLIBRARY_SOURCES = \
connection.c listen.c util_mutex.c \
mpm_common.c mpm_unix.c mpm_fdqueue.c \
util_charset.c util_cookies.c util_debug.c util_xml.c \
- util_filter.c util_pcre.c util_regex.c exports.c \
+ util_filter.c util_pcre.c util_regex.c $(EXPORTS_DOT_C) \
scoreboard.c error_bucket.c protocol.c core.c request.c provider.c \
eoc_bucket.c eor_bucket.c core_filters.c \
util_expr_parse.c util_expr_scan.c util_expr_eval.c \
diff --git a/server/main.c b/server/main.c
index a88085fe9f..ac9e5dafd2 100644
--- a/server/main.c
+++ b/server/main.c
@@ -861,7 +861,7 @@ static void usage(process_rec *process)
return !OK;
}
-#ifdef AP_USING_AUTOCONF
+#ifdef AP_FORCE_EXPORTS
/* This ugly little hack pulls any function referenced in exports.c into
* the web server. exports.c is generated during the build, and it
* has all of the APR functions specified by the apr/apr.exports and