summaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2022-12-05 21:42:42 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2022-12-05 23:10:55 -0500
commit01ffe16e4da2f204b58993a92f8623ad64f985ef (patch)
tree7f625e5a456c74909e1061f5c81f7eec1de14cb5 /src/Makefile.am
parent3bc7866f34ba9b16c8c15484c9e0ba53080124c0 (diff)
downloadlighttpd-git-01ffe16e4da2f204b58993a92f8623ad64f985ef.tar.gz
[core] build core modules into lighttpd executable
In dynamic build of lighttpd, at runtime each loaded lighttpd module .so takes at least (5) 4k memory pages on x86_64. That is at least 20k per module. Building 10 small core modules into lighttpd adds less than 16k .text total, and adding mod_fastcgi and mod_scgi totals less than 20k .text (plus an extra 4k .rodata page). The end result is that memory usage is almost the same if only mod_staticfile is used, and 20k or so is saved for each additional module used if among those built into lighttpd executable. For now, the standalone .so modules continue to be built, even though not used by the lighttpd executable. This is done in order to give distros time to update packaging scripts and transition to not expecting the builtin module artifacts to be produced or installed as part of the distro lighttpd package.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index dc943a39..ff2b35df 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -78,6 +78,24 @@ src = server.c response.c connections.c h2.c reqpool.c \
vector.c \
configfile.c configparser.c
+builtin_mods = \
+ mod_rewrite.c \
+ mod_redirect.c \
+ mod_access.c \
+ mod_alias.c \
+ mod_indexfile.c \
+ mod_staticfile.c \
+ mod_setenv.c \
+ mod_expire.c \
+ mod_simple_vhost.c \
+ mod_evhost.c \
+ mod_fastcgi.c \
+ mod_scgi.c
+
+if !LIGHTTPD_STATIC
+src += $(builtin_mods)
+endif
+
lib_LTLIBRARIES =
if NO_RDYNAMIC
@@ -436,6 +454,7 @@ lighttpd_SOURCES = \
mod_scgi.c \
mod_setenv.c \
mod_simple_vhost.c \
+ mod_sockproxy.c \
mod_ssi.c \
mod_staticfile.c \
mod_status.c \