Reorganize boot image inclusion on C
Cuts the build time in half that flisp.c is no longer re-compiled unnecessarily.
This commit is contained in:
parent
297e6fa13d
commit
847eb585ae
|
@ -0,0 +1,5 @@
|
|||
#include <stddef.h>
|
||||
|
||||
#include "../scheme-boot/boot_image.h"
|
||||
|
||||
const size_t boot_image_size = sizeof(boot_image);
|
|
@ -49,8 +49,6 @@
|
|||
|
||||
#include "opcodes.h"
|
||||
|
||||
#include "../scheme-boot/boot_image.h"
|
||||
|
||||
static char *builtin_names[] = {
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
// predicates
|
||||
|
@ -2654,7 +2652,7 @@ int fl_load_boot_image(void)
|
|||
|
||||
f = cvalue(iostreamtype, sizeof(struct ios));
|
||||
s = value2c(struct ios *, f);
|
||||
ios_static_buffer(s, boot_image, sizeof(boot_image));
|
||||
ios_static_buffer(s, boot_image, boot_image_size);
|
||||
PUSH(f);
|
||||
saveSP = SP;
|
||||
{
|
||||
|
|
|
@ -997,4 +997,9 @@ value_t fl_stringp(value_t *args, uint32_t nargs);
|
|||
value_t fl_string_reverse(value_t *args, uint32_t nargs);
|
||||
value_t fl_string_sub(value_t *args, uint32_t nargs);
|
||||
|
||||
// boot_image.c
|
||||
|
||||
extern char boot_image[];
|
||||
extern const size_t boot_image_size;
|
||||
|
||||
#include "htableh_inc.h"
|
||||
|
|
|
@ -6,6 +6,7 @@ o_files="$o_files algo_color.o"
|
|||
o_files="$o_files argcount.o"
|
||||
o_files="$o_files bitvector-ops.o"
|
||||
o_files="$o_files bitvector.o"
|
||||
o_files="$o_files boot_image.o"
|
||||
o_files="$o_files buf.o"
|
||||
o_files="$o_files builtins.o"
|
||||
o_files="$o_files dump.o"
|
||||
|
@ -94,6 +95,7 @@ $CC $CFLAGS -c ../c/builtins.c
|
|||
$CC $CFLAGS -c ../c/dump.c
|
||||
$CC $CFLAGS -c ../c/env_unix.c
|
||||
$CC $CFLAGS -c ../c/equalhash.c
|
||||
$CC $CFLAGS -c ../c/flisp.c
|
||||
$CC $CFLAGS -c ../c/flmain.c
|
||||
$CC $CFLAGS -c ../c/hashing.c
|
||||
$CC $CFLAGS -c ../c/htable.c
|
||||
|
@ -114,7 +116,7 @@ $CC $CFLAGS -c ../c/text_ini.c
|
|||
$CC $CFLAGS -c ../c/time_unix.c
|
||||
$CC $CFLAGS -c ../c/utf8.c
|
||||
|
||||
$CC $CFLAGS -c ../c/flisp.c
|
||||
$CC $CFLAGS -c ../c/boot_image.c
|
||||
$CC $LFLAGS -o upscheme $o_files
|
||||
|
||||
{ set +x; } 2>/dev/null
|
||||
|
@ -131,7 +133,7 @@ cd ../"$builddir"
|
|||
echo "Entering directory '$PWD'"
|
||||
set -x
|
||||
|
||||
$CC $CFLAGS -c ../c/flisp.c
|
||||
$CC $CFLAGS -c ../c/boot_image.c
|
||||
$CC $LFLAGS -o upscheme $o_files
|
||||
|
||||
{ set +x; } 2>/dev/null
|
||||
|
@ -148,7 +150,7 @@ cd ../"$builddir"
|
|||
echo "Entering directory '$PWD'"
|
||||
set -x
|
||||
|
||||
$CC $CFLAGS -c ../c/flisp.c
|
||||
$CC $CFLAGS -c ../c/boot_image.c
|
||||
$CC $LFLAGS -o upscheme $o_files
|
||||
|
||||
{ set +x; } 2>/dev/null
|
||||
|
|
Loading…
Reference in New Issue