-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
70 lines (59 loc) · 1.25 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
64
65
66
67
68
69
70
# vim: ft=meson sw=8 noet
project(
'tcg',
'c',
version: '0.1',
default_options: [
'c_std=c11',
'warning_level=2',
]
)
cflags = [
'-Wdouble-promotion',
'-Wno-unused-parameter',
'-Wno-unused-function',
'-Wno-sign-compare',
'-Wno-sign-conversion',
'-Wno-self-assign',
]
if get_option('buildtype') == 'debug'
cflags += [
'-g3',
]
endif
cc = meson.get_compiler('c')
add_project_arguments(
cc.get_supported_arguments(cflags),
language: 'c',
)
exe = executable('tcg',
sources: files(
'src/utils/arena.c',
'src/utils/worklist.c',
'src/utils/str.c',
'src/utils/table.c',
'src/utils/environment.c',
'src/utils/bitset.c',
'src/utils/utils.c',
'src/frontend/c/parser.c',
'src/middleend/type.c',
'src/middleend/ir.c',
'src/middleend/passes/value_numbering.c',
'src/middleend/passes/merge_blocks.c',
'src/middleend/passes/thread_jumps.c',
'src/middleend/passes/split_critical_edges.c',
'src/middleend/passes/single_exit.c',
'src/middleend/passes/deconstruct_ssa.c',
'src/backend/inst.c',
'src/backend/regalloc.c',
'src/backend/x86-64/x86-64.c',
'src/backend/x86-64/lower.c',
'src/backend/x86-64/peephole.c',
'src/main.c',
),
include_directories: include_directories(
'src',
),
install: true,
)
test('basic', exe)