Page MenuHomeFreeBSD

flua: support our flua modules in the bootstrap flua
Needs ReviewPublic

Authored by kevans on Thu, Aug 14, 6:09 AM.
Tags
None
Referenced Files
F127801968: D51890.id160316.diff
Thu, Sep 4, 2:25 PM
Unknown Object (File)
Sun, Aug 31, 10:17 PM
Unknown Object (File)
Tue, Aug 26, 9:52 PM
Unknown Object (File)
Tue, Aug 26, 4:09 PM
Unknown Object (File)
Tue, Aug 26, 3:30 PM
Unknown Object (File)
Tue, Aug 26, 3:26 PM
Unknown Object (File)
Tue, Aug 26, 3:20 PM
Unknown Object (File)
Tue, Aug 26, 2:02 AM
Subscribers
None

Details

Summary

This version builds every module into the flua binary itself, since all
of the bootstrap tools are built -DNO_SHARED. As a result, we also
cannot dlsym(), so we can't really discover the names of our newly
builtin modules. Instead, just build out a linker set with all of our
luaopen_*() functions to register everything up-front.

Building in all of the modules isn't strictly necessary, but it means
that we have an example of how to add a bootstrap module everywhere you
go and one doesn't need to consider whether bootstrap flua can use a
module when writing scripts. On my build machine, the consequence on
our binary size is an increase from around 1.6M -> 1.9M, which isn't
really that bad.

.lua modules can install into their usual path below $WORLDTMP/legacy
and we'll pick them up automagically by way of the ctor that sets up
LUA_PATH early on.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 66219
Build 63102: arc lint + arc unit

Event Timeline

kevans created this revision.
libexec/flua/libucl/Makefile.inc
1

intentional?

libexec/flua/libucl/Makefile.inc
1

Yes, I wanted to give us the option of raising the WARNS or excluding other modules that had an equal or lower WARNS without breaking the build