-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
73 lines (59 loc) · 1.55 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
71
72
73
project(
'gaia',
['cpp', 'c'],
default_options: [
'cpp_std=c++20',
'build.cpp_std=c++20',
'werror=false',
'buildtype=debug',
'warning_level=2',
'b_sanitize=undefined',
],
)
test_srcs = []
kernel_srcs = []
kernel_inc = []
cpp_args = ['-ffreestanding', '-nostdlib', '-D__KERNEL__']
kernel_deps = []
test_deps = []
#add_global_arguments('-DFLANTERM_FB_DISABLE_BUMP_ALLOC', language: 'c')
subdir('src')
# Kernel deps
kernel_deps += dependency(
'frigg',
default_options: ['frigg_no_install=true'],
fallback: ['frigg', 'frigg_dep'],
)
kernel_deps += dependency('chdrs', fallback: ['chdrs', 'chdrs_dep'])
kernel_deps += dependency('cxxhdrs', fallback: ['cxxhdrs', 'cxxhdrs_dep'])
kernel_deps += dependency('lai', fallback: ['lai', 'dependency'])
kernel_deps += dependency('flanterm', fallback: ['flanterm', 'flanterm_dep'])
test_deps += dependency(
'frigg',
default_options: ['frigg_no_install=true'],
fallback: ['frigg', 'frigg_dep'],
native: true,
)
if meson.is_cross_build()
subdir('tests')
endif
git = find_program('git', disabler: true, required: false)
if git.found()
r = run_command('git', 'rev-parse', '--short', 'HEAD', check: false)
git_rev = ''
if r.returncode() == 0
git_rev = r.stdout().strip()
else
git_rev = 'unknown'
endif
cpp_args += ['-D__GAIA_GIT_VERSION__="@0@"'.format(git_rev)]
endif
executable(
'gaia.elf',
sources: kernel_srcs,
include_directories: kernel_inc,
cpp_args: cpp_args,
c_args: cpp_args,
dependencies: kernel_deps,
link_args: '-Wl,-T@0@'.format(linker_script),
)