[Ecls-list] Re: CFFI-Grovel and ECL
Greg Pfeil
sellout42 at mac.com
Mon May 8 17:55:05 UTC 2006
On 8 May 2006, at 16:13, Dan Knapp wrote:
> Well, I was originally working on the assumption that the
> cffi-grovel perform method wasn't getting called at all. But I just
> realized that it actually could be getting called and there still
> wouldn't be any effect. The asdf-ecl perform method does:
>
> (apply #'c::builder (build-op-type o) out-file :lisp-files
> obj-files (build-op-args o))
>
> In other words, it calls an internal ecl function, giving it the
> names which it thinks are the names of the object files... but if
> those names are wrong, it won't work. I note that it gets those names
> from two very different places depending on the setting of
> build-op-monolithic. Have you tried it both ways?
Yeah, the behavior is the same, regardless of monolithic. If monolithic
is t, then it just adds the other libraries to the list of object
files, they still come from the same place.
NOTE: In my local cffi-grovel, I changed the suffix from ".cffi" to
"_cffi" so as to not confuse the logical pathname system. This seems to
behave at least as well as with the dot.
I tried adding the following to cffi-grovel:
(defmethod asdf:output-files ((op asdf:build-op) (component
cffi-grovel-file))
(list (concatenate 'string
(remove-suffix (namestring
(asdf:component-pathname
component))
+input-suffix+)
"_cffi.o")))
thinking that if it was passed an object file based on the processed
grovel file, it would try to load the processed file:
> (asdf::get-object-files (asdf:find-system :test))
(#P"/path/to/foo.o" "/path/to/bar_cffi.o" #P"/path/to/baz.o")
but this made no difference. Just to make sure it happens somewhere in
the ASDF world, I put the processed file in the ASD directly:
;; (cffi-grovel-file "bar")
(:file "bar_cffi")
and this seemed to work. (Which is good, because if it didn't I would
have been very worried.)
I also tried defining asdf:input-files and asdf:output-files for a
bunch of operations, seeing if any of them were being called, but no
luck there ... just grasping at straws.
More information about the ecl-devel
mailing list