[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: build optimizations
- From: Sam Roberts <vieuxtech@...>
- Date: Tue, 22 Mar 2011 09:12:59 -0700
On Tue, Mar 22, 2011 at 5:24 AM, Luiz Henrique de Figueiredo
> Here are two points on the build process that we'd like your input on:
> 1. The Makefile assumes gcc. So we might as well use all gcc-specific flags
> to get a better Lua core and interpreter, for some definition of "better".
> For instance, -fomit-frame-pointer seems to generate smaller and faster
> binaries, but a Lua library compiled with -fomit-frame-pointer might not
> be debuggable. Is this really a bad thing? Or will anyone needing to debug
> the Lua library add the source code to the project and thus not rely on
> whatever pre-built Lua exists in their system? What gcc-specific flags
> should we use if we go that way?
I'd suggest either continuing with a build target per platform, where
there is a vanilla
target that does not assume gnu chain (just cc, ld, ar), or else bit
the bullet and put
a real build system in.
I dislike autotools as much as anybody, but it works, makes it easy
for packagers, and there are enough people on lua-l familiar with
autotools and/or cmake
to maintain a working build.
It might even be worth doing something sqlite-like: one release with
split source and minimal
gcc only Makefile, and the community does a follow-on parallel release
source, and a build system friendly to packagers.
I appreciate that the lua build system as-is allows a great deal of
flexibility to packagers... but it
is often unwanted and unused, and packagers might nott know enough
about lua to choose
correct build flags.
> 2. The file all.c (aka one.c) allows Lua to be built as a single object file,
> and allows the compiler to generate better code and with just the Lua API
> as public symbols. We are considering building Lua in this way, so that
> liblua.a will consist of a single object file. Does anyone see a drawback
> to this?
I like this idea, making this the default build. It works well for
sqlite (which is also built for similar target environments as lua).