mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
Dynamic modules.
The auto/module script is extended to understand ngx_module_link=DYNAMIC. When set, it links the module as a shared object rather than statically into nginx binary. The module can later be loaded using the "load_module" directive. New auto/module parameter ngx_module_order allows to define module loading order in complex cases. By default the order is set based on ngx_module_type. 3rd party modules can be compiled dynamically using the --add-dynamic-module configure option, which will preset ngx_module_link to "DYNAMIC" before calling the module config script. Win32 support is rudimentary, and only works when using MinGW gcc (which is able to handle exports/imports automatically). In collaboration with Ruslan Ermilov.
This commit is contained in:
@@ -14,6 +14,9 @@ CORE_SRCS="$UNIX_SRCS $DARWIN_SRCS"
|
||||
ngx_spacer='
|
||||
'
|
||||
|
||||
MAIN_LINK=
|
||||
MODULE_LINK="-shared -Wl,-undefined,dynamic_lookup"
|
||||
|
||||
# kqueue
|
||||
|
||||
echo " + kqueue found"
|
||||
|
||||
@@ -12,10 +12,15 @@ OS_CONFIG="$WIN32_CONFIG"
|
||||
NGX_ICONS="$NGX_WIN32_ICONS"
|
||||
SELECT_SRCS=$WIN32_SELECT_SRCS
|
||||
|
||||
ngx_pic_opt=
|
||||
|
||||
case "$NGX_CC_NAME" in
|
||||
|
||||
gcc)
|
||||
CORE_LIBS="$CORE_LIBS -ladvapi32 -lws2_32"
|
||||
MAIN_LINK="$MAIN_LINK -Wl,--export-all-symbols"
|
||||
MAIN_LINK="$MAIN_LINK -Wl,--out-implib=$NGX_OBJS/libnginx.a"
|
||||
MODULE_LINK="-shared -L $NGX_OBJS -lnginx"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
Reference in New Issue
Block a user