Merge tag 'pull-loongarch-20241016' of https://gitlab.com/gaosong/qemu into staging
[qemu/armbru.git] / gdbstub / meson.build
blobdff741ddd4d78588af80c286b6387f8558a0716c
2 # The main gdbstub still relies on per-build definitions of various
3 # types. The bits pushed to system/user.c try to use guest agnostic
4 # types such as hwaddr.
7 # We need to build the core gdb code via a library to be able to tweak
8 # cflags so:
10 gdb_user_ss = ss.source_set()
11 gdb_system_ss = ss.source_set()
13 # We build two versions of gdbstub, one for each mode
14 gdb_user_ss.add(files('gdbstub.c', 'user.c'))
15 gdb_system_ss.add(files('gdbstub.c', 'system.c'))
17 gdb_user_ss = gdb_user_ss.apply({})
18 gdb_system_ss = gdb_system_ss.apply({})
20 libgdb_user = static_library('gdb_user',
21                              gdb_user_ss.sources() + genh,
22                              c_args: '-DCONFIG_USER_ONLY',
23                              build_by_default: false)
25 libgdb_system = static_library('gdb_system',
26                                 gdb_system_ss.sources() + genh,
27                                 build_by_default: false)
29 gdb_user = declare_dependency(objects: libgdb_user.extract_all_objects(recursive: false))
30 user_ss.add(gdb_user)
31 gdb_system = declare_dependency(objects: libgdb_system.extract_all_objects(recursive: false))
32 system_ss.add(gdb_system)
34 common_ss.add(files('syscalls.c'))
36 # The user-target is specialised by the guest
37 specific_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-target.c'))