- use librtti

- Fix issue to xce_get() api cause client side crash
- add parse resreq section
- add rusage parser
- parse resreq with basic support alternative & compound, still miss select
This commit is contained in:
Rongsong Shen 2026-02-05 17:21:17 +08:00
parent e7dc09c604
commit cd4f3953b2
20 changed files with 1422 additions and 15 deletions

View file

@ -1,4 +1,5 @@
capnp = find_program('capnp')
packcc = find_program('packcc')
gen_srcs = custom_target(
'controllercapnp.[ch]',
@ -7,7 +8,50 @@ gen_srcs = custom_target(
command: [capnp, 'compile','-o' ,'c:lib', '-I', '../schema','--src-prefix', '../schema', '@INPUT@']
)
section_parser = custom_target(
'xce resreq section parser',
output: ['section.c', 'section.h'],
input: ['section.peg'],
command: [
packcc,
'-l',
'-o',
'lib/section',
'@INPUT@'
],
build_by_default: true)
rusage_parser = custom_target(
'xce resreq rusage parser',
output: ['rusage.c', 'rusage.h'],
input: ['rusage.peg'],
command: [
packcc,
'-l',
'-o',
'lib/rusage',
'@INPUT@'
],
build_by_default: true)
xce_resreq_parser = custom_target(
'xce resreq xce_resreq parser',
output: ['xce_resreq.c', 'xce_resreq.h'],
input: ['xce_resreq.peg'],
command: [
packcc,
'-l',
'-o',
'lib/xce_resreq',
'@INPUT@'
],
build_by_default: true)
libxce_src = [ gen_srcs[0],
section_parser[0],
rusage_parser[0],
xce_resreq_parser[0],
'client.c',
'dataq.c',
'hook.c',
@ -37,6 +81,7 @@ libxce_src = [ gen_srcs[0],
'xcelimit.c',
'xvec.c',
'helper.c',
'resreq.c',
]
incdir = include_directories('../include')
@ -87,6 +132,7 @@ libxce_test_src = ['testsuite/test.c',
'testsuite/test_xlist.c',
'testsuite/test_limit.c',
'testsuite/test_xvec.c',
'testsuite/test_resreq.c',
]
libxce_test_deps = [libxce_deps, unity_dep, libxce_dep]