mirror of
https://github.com/justinian/jsix.git
synced 2025-12-09 16:04:32 -08:00
Added a release config, and fixed a few spots where optimizations broke things: - Clang was generating incorrect code for run_ctor_list in libc's init.cpp (it ignored a check for the end of the list) - my rep movsb memcpy implementation used incorrect inline asm constraints, so it was returning a pointer to the end of the copied range instead of the start. Since this function was just inline asm anyway, I rewrote it in asm by hand in a new memutils.s file.
61 lines
1.4 KiB
Python
61 lines
1.4 KiB
Python
# vim: ft=python
|
|
|
|
j6 = module("j6",
|
|
kind = "lib",
|
|
deps = [ "util" ],
|
|
sources = [
|
|
"channel.cpp",
|
|
"condition.cpp",
|
|
"init.cpp",
|
|
"memutils.cpp",
|
|
"memutils.s",
|
|
"mutex.cpp",
|
|
"protocol_ids.cpp",
|
|
"protocols/service_locator.cpp",
|
|
"protocols/vfs.cpp",
|
|
"syscalls.s.cog",
|
|
"sysconf.cpp.cog",
|
|
"syslog.cpp",
|
|
],
|
|
public_headers = [
|
|
"j6/cap_flags.h.cog",
|
|
"j6/channel.hh",
|
|
"j6/condition.hh",
|
|
"j6/errors.h",
|
|
"j6/flags.h",
|
|
"j6/init.h",
|
|
"j6/mutex.hh",
|
|
"j6/memutils.h",
|
|
"j6/protocols.h",
|
|
"j6/protocols/service_locator.h",
|
|
"j6/protocols/service_locator.hh",
|
|
"j6/syscalls.h.cog",
|
|
"j6/sysconf.h.cog",
|
|
"j6/syslog.hh",
|
|
"j6/thread.hh",
|
|
"j6/types.h",
|
|
|
|
"j6/tables/log_areas.inc",
|
|
"j6/tables/object_types.inc",
|
|
"j6/tables/syscalls.inc",
|
|
"j6/tables/vm_flags.inc",
|
|
])
|
|
|
|
from glob import glob
|
|
from os.path import join
|
|
|
|
sysconf = join(source_root, "definitions/sysconf.yaml")
|
|
definitions = glob('definitions/**/*.def', recursive=True)
|
|
|
|
j6.add_depends([
|
|
"j6/cap_flags.h.cog",
|
|
"j6/syscalls.h.cog",
|
|
"syscalls.s.cog",
|
|
], definitions)
|
|
|
|
j6.add_depends([
|
|
"j6/sysconf.h.cog",
|
|
"sysconf.cpp.cog",
|
|
], [sysconf])
|
|
|