-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathmeson.build
More file actions
52 lines (48 loc) · 1.06 KB
/
meson.build
File metadata and controls
52 lines (48 loc) · 1.06 KB
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
build_dir = run_command(
realpath,
'--relative-to',
meson.current_source_dir(),
meson.current_build_dir(),
capture: true,
check: true
).stdout().strip()
env = environment()
env.prepend('PATH', rust_bin)
env.set('LINUX_OBJ', kbuild_dir)
env.set('LINUX_SRC', join_paths(meson.project_source_root(), './linux'))
env.set('CARGO_TARGET_DIR', join_paths(build_dir, 'target'))
sample_clippy = custom_target(
'bmc-clippy',
output: ['target'],
command: [
cargo_wrapper, rust_bin, '-Z',
'unstable-options',
'-C', meson.current_source_dir(),
'clippy', '-qr'
],
env: env,
console: false,
build_by_default: true
)
sample_build = custom_target(
'bmc-build',
output: ['bmc'],
command: [
cargo_wrapper, rust_bin, '-Z',
'unstable-options',
'-C', meson.current_source_dir(),
'rustc', '-qr', '--',
'-Cenable_rex'
],
depends: sample_clippy,
env: env,
console: false,
build_by_default: true
)
executable(
'entry',
'entry.c',
build_by_default: true,
dependencies: [librex_dep, libbpf_dep, kernel_dep],
pie: true
)