forked from yandex-cloud/yc-libvhost-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
63 lines (53 loc) · 1.13 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
project(
'yc-libvhost-server', 'c'
)
libvhost_log_verbosity = 'LOG_INFO'
libvhost_includes = include_directories(
'include'
)
libvhost_sources = files([
'blockdev.c',
'event.c',
'fs.c',
'logging.c',
'memlog.c',
'memmap.c',
'server.c',
'vdev.c',
'virtio/virtio_blk.c',
'virtio/virtio_fs.c',
'virtio/virt_queue.c'
])
libvhost_args = [
'-Wall',
'-Werror',
'-Wextra',
'-Wno-unused-parameter',
'-g',
'-O2',
]
cc = meson.get_compiler('c')
if cc.get_id() == 'gcc'
libvhost_args += [
'-Wno-error=unused-value',
'-Wno-error=unused-result',
'-Wno-error=strict-aliasing',
]
endif
libvhost_optional_args = cc.get_supported_arguments(
'-Wmissing-prototypes',
'-Wmissing-variable-declarations',
'-Wzero-length-array',
'-Wzero-length-bounds',
)
libvhost_defines = [
'-D_GNU_SOURCE',
'-DLOG_VERBOSITY=' + libvhost_log_verbosity
]
libvhost = static_library(
'vhost',
sources: libvhost_sources,
include_directories: libvhost_includes,
c_args: libvhost_args + libvhost_optional_args + libvhost_defines,
)
subdir('tests')