今天读ngx_lua文档
https://github.com/chaoslawful/lua-nginx-module#statically-linking-pure-lua-modules
最后一段:
where
/path/to/lib
is the path of the directory containing the
libmyluafiles.a
file. It should be noted that the linker option
--while-archive
is required here because otherwise our archive will be skipped because
no symbols in our archive are mentioned in the main parts of the nginx
executable.
我觉得 --while-archive应该是whole-archive喔!
--
with kind regards