[Ecls-list] C:MAKE-BUILD composition and hierarchical ar shrink-wrapping

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Sat Mar 29 19:28:52 UTC 2008


2008/3/26 Samium Gromoff <_deepfire at mail.ru>:
>  Hmm, when I feed :TYPE :FASL to ASDF:MAKE-BUILD, it does build fine, but
>  the nastiness appears when I try to CL:LOAD the resulting fas file.
>  And looking at the log of what ECL does, it appears that it still shrink-wraps
>  things using ar...

Hi Samium, I have redone ASDF:MAKE-BUILD from scratch. Michael's high
level interface is still there, but now ECL works differently. It
first builds a list of all COMPILE-OP and LOAD-OP that a normal call
to ASDF would do and then uses this information to build the FASL,
static library or shared library you need.

The behavior depends strongly on the argument :MONOLITHIC, which
previously defaulted to T and now doesn't. A monolithic fasl or
library is one that contains all object files from the current system
and the ones it depends on. :MONOLITHIC T works with all targets, let
it be :FASL, :DLL, :LIB, :PROGRAM, etc. :MONOLITHIC NIL only works
with :FASL and with :LIB, but I am working the next version which will
support creating a shared library only for a system.

The idea is that :MONOLITHIC T is intended for building a self
contained package, while :MONOLITHIC NIL will be used by a new
operation (I still do not have a name for it) that replaces LOAD-OP
using a single binary file for each ASDF system.

The new code is available in CVS. But if you do not want to upgrade,
it can still be downloaded from
http://common-lisp.net/cgi-bin/viewcvs.cgi/ecl/contrib/asdf/asdf-ecl.lisp?rev=1.5&root=ecl&view=log

Following your test case, if you want to build a static library for
the system C including A and B you would type
(ASDF:MAKE-BUILD :C  :TYPE :LIB :MONOLITHIC T)
If you want a single library for each module and you will take care of
the initialization order yourself,
(ASDF:MAKE-BUILD :A  :TYPE :LIB)
(ASDF:MAKE-BUILD :B  :TYPE :LIB)
(ASDF:MAKE-BUILD :C  :TYPE :LIB)
If you want to build everything into a single FASL file
(ASDF:MAKE-BUILD :C  :TYPE :FAS :MONOLITHIC T)
(LOAD "c-mono.fas")
If you want to build and load each module separately
(ASDF:MAKE-BUILD :A  :TYPE :FAS :MONOLITHIC T)
(LOAD "a.fas")
(ASDF:MAKE-BUILD :A  :TYPE :FAS :MONOLITHIC T)
(LOAD "b.fas")
(ASDF:MAKE-BUILD :A  :TYPE :FAS :MONOLITHIC T)
(LOAD "c.fas")

Notice the suffix "-mono" that gets appended to the monolithic
versions. This permits both versions to coexist.

Juanjo

-- 
Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the ecl-devel mailing list