Hi Fengze, The command to compile gem5 as a library is,
scons build/X86/libgem5_opt.so The ISA and the variant (e.g. opt, debug, fast) options are the same as those of compiling gem5 as an executable. Regards, Hoa Nguyen On Thu, Oct 7, 2021, 3:01 AM Fengze Yu via gem5-users <gem5-users@gem5.org> wrote: > > Hi > > Building GEM5 using scons generates an executable file gem5.opt. What if > I want to generate a static or dynamic library, which is either a .a or .so > file, instead of an executable? > I have noticed that in SConscript under gem5/src, there is a process to > make all the object into an library, but I could not find any file with .a > or .so suffix under the build/ directory. > > # First make a library of everything but main() so other programs can > # link against m5. > static_lib = new_env.StaticLibrary(libname, static_objs) > shared_lib = new_env.SharedLibrary(libname, shared_objs) > > > Thanks > > Fengze > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-le...@gem5.org > %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
_______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s