mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-16 14:21:48 -08:00
The :prologue-code in cmp:builder is now executed after cl_boot() and it can be lisp code.
This commit is contained in:
parent
41c4586f65
commit
6e7caff184
1 changed files with 18 additions and 2 deletions
|
|
@ -261,8 +261,8 @@ void ~A(cl_object cblock)
|
|||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
~A
|
||||
cl_boot(argc, argv);
|
||||
~A
|
||||
read_VV(OBJNULL, ~A);
|
||||
~A
|
||||
}")
|
||||
|
|
@ -275,9 +275,9 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdS
|
|||
{
|
||||
char **argv;
|
||||
int argc;
|
||||
~A
|
||||
ecl_get_commandline_args(&argc, &argv);
|
||||
cl_boot(argc, argv);
|
||||
~A
|
||||
read_VV(OBJNULL, ~A);
|
||||
~A
|
||||
}")
|
||||
|
|
@ -416,6 +416,22 @@ return 1;"
|
|||
stream))
|
||||
(princ #\} stream)
|
||||
)))))
|
||||
(cond ((null prologue-code)
|
||||
(setf prologue-code ""))
|
||||
((stringp prologue-code)
|
||||
)
|
||||
(t
|
||||
(with-standard-io-syntax
|
||||
(setq prologue-code
|
||||
(with-output-to-string (stream)
|
||||
(princ "{ const char *lisp_code = " stream)
|
||||
(wt-filtered-data (write-to-string prologue-code) stream)
|
||||
(princ ";
|
||||
cl_object output;
|
||||
si_select_package(make_simple_base_string(\"CL-USER\"));
|
||||
output = si_safe_eval(3, ecl_read_from_cstring(lisp_code), Cnil, OBJNULL);
|
||||
}" stream)
|
||||
)))))
|
||||
;;
|
||||
;; When a module is built out of several object files, we have to
|
||||
;; create an additional object file that initializes those ones.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue