From 31c7ee156c7a8339ae9d8b2a5adec479f11183ee Mon Sep 17 00:00:00 2001 From: Max Regan Date: Sun, 20 Nov 2022 22:27:10 -0500 Subject: [PATCH] Build and use a static library for repl & tests --- SConstruct | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/SConstruct b/SConstruct index 448a0f6..84071ac 100644 --- a/SConstruct +++ b/SConstruct @@ -57,14 +57,17 @@ class BuildVariant: self.env.Object(target=self.built(with_suffix(p, ".o")), source=p) for p in LIB_SRCS ] + self.static_lib = self.env.StaticLibrary(self.built("uclisp"), self.lib_objs) def configure_repl(self): pgm_objs = [ self.env.Object(target=self.built(with_suffix(p, ".o")), source=p) for p in PROGRAM_SOURCES ] - self.repl_program = self.env.Program( - self.built("uclisp"), self.lib_objs + pgm_objs + repl_env = self.env.Clone() + repl_env.Append(LIBS=[self.static_lib]) + self.repl_program = repl_env.Program( + self.built("uclisp"), pgm_objs, ) def configure_tests(self): @@ -73,7 +76,9 @@ class BuildVariant: for p in TEST_LIB_SRCS ] - test_deps = test_lib_objs + self.lib_objs + self.test_env.Append(LIBS=[self.static_lib]) + + test_deps = test_lib_objs test_objs = [ self.test_env.Object(target=self.built(with_suffix(p, ".o")), source=p) for p in TEST_SRCS