mirror of
https://github.com/JakeHillion/scx.git
synced 2024-11-26 11:30:22 +00:00
Merge pull request #399 from sched-ext/meson-serialize
meson: introduce serialize build option
This commit is contained in:
commit
183b1b2cfc
@ -264,6 +264,7 @@ options can be used in such cases.
|
||||
- 'cargo_home': 'CARGO_HOME env to use when invoking cargo'
|
||||
- `offline`: 'Compilation step should not access the internet'
|
||||
- `enable_rust`: 'Enable the build of rust sub-projects'
|
||||
- `serialize`: 'Enable/disable the sequential build of the schedulers. Set this to false if you need to build just one scheduler.'
|
||||
|
||||
For example, let's say you want to use `bpftool` and `libbpf` shipped in the
|
||||
kernel tree located at `$KERNEL`. We need to build `bpftool` in the kernel
|
||||
|
@ -12,6 +12,8 @@ cc = meson.get_compiler('c')
|
||||
|
||||
enable_rust = get_option('enable_rust')
|
||||
|
||||
serialize = get_option('serialize')
|
||||
|
||||
bpf_clang = find_program(get_option('bpf_clang'))
|
||||
|
||||
enable_stress = get_option('enable_stress')
|
||||
|
@ -14,6 +14,8 @@ option('offline', type: 'boolean', value: 'false',
|
||||
description: 'Compilation step should not access the internet')
|
||||
option('enable_rust', type: 'boolean', value: 'true',
|
||||
description: 'Enable rust sub-projects')
|
||||
option('serialize', type: 'boolean', value: 'true',
|
||||
description: 'Serialize the build of all schedulers')
|
||||
option('enable_stress', type: 'boolean', value: 'true',
|
||||
description: 'Enable stress tests')
|
||||
option('kernel', type: 'string', value: 'vmlinuz',
|
||||
|
@ -1,8 +1,14 @@
|
||||
if serialize
|
||||
sched_deps = [libbpf, bpftool_target, sched]
|
||||
else
|
||||
sched_deps = [libbpf, bpftool_target]
|
||||
endif
|
||||
|
||||
sched = custom_target('scx_lavd',
|
||||
output: '@PLAINNAME@.__PHONY__',
|
||||
input: 'Cargo.toml',
|
||||
command: [cargo, 'build', '--manifest-path=@INPUT@', '--target-dir=@OUTDIR@',
|
||||
cargo_build_args],
|
||||
env: cargo_env,
|
||||
depends: [sched],
|
||||
depends: sched_deps,
|
||||
build_always_stale: true)
|
||||
|
@ -1,8 +1,14 @@
|
||||
if serialize
|
||||
sched_deps = [libbpf, bpftool_target, sched]
|
||||
else
|
||||
sched_deps = [libbpf, bpftool_target]
|
||||
endif
|
||||
|
||||
sched = custom_target('scx_layered',
|
||||
output: '@PLAINNAME@.__PHONY__',
|
||||
input: 'Cargo.toml',
|
||||
command: [cargo, 'build', '--manifest-path=@INPUT@', '--target-dir=@OUTDIR@',
|
||||
cargo_build_args],
|
||||
env: cargo_env,
|
||||
depends: [libbpf, bpftool_target, sched],
|
||||
depends: sched_deps,
|
||||
build_always_stale: true)
|
||||
|
@ -1,8 +1,14 @@
|
||||
if serialize
|
||||
sched_deps = [libbpf, bpftool_target, sched]
|
||||
else
|
||||
sched_deps = [libbpf, bpftool_target]
|
||||
endif
|
||||
|
||||
sched = custom_target('scx_mitosis',
|
||||
output: '@PLAINNAME@.__PHONY__',
|
||||
input: 'Cargo.toml',
|
||||
command: [cargo, 'build', '--manifest-path=@INPUT@', '--target-dir=@OUTDIR@',
|
||||
cargo_build_args],
|
||||
env: cargo_env,
|
||||
depends: [libbpf, bpftool_target, sched],
|
||||
depends: sched_deps,
|
||||
build_always_stale: true)
|
||||
|
@ -1,8 +1,14 @@
|
||||
if serialize
|
||||
sched_deps = [libbpf, bpftool_target, sched]
|
||||
else
|
||||
sched_deps = [libbpf, bpftool_target]
|
||||
endif
|
||||
|
||||
sched = custom_target('scx_rlfifo',
|
||||
output: '@PLAINNAME@.__PHONY__',
|
||||
input: 'Cargo.toml',
|
||||
command: [cargo, 'build', '--manifest-path=@INPUT@', '--target-dir=@OUTDIR@',
|
||||
cargo_build_args],
|
||||
env: cargo_env,
|
||||
depends: [libbpf, bpftool_target, sched],
|
||||
depends: sched_deps,
|
||||
build_always_stale: true)
|
||||
|
@ -1,8 +1,14 @@
|
||||
if serialize
|
||||
sched_deps = [libbpf, bpftool_target, sched]
|
||||
else
|
||||
sched_deps = [libbpf, bpftool_target]
|
||||
endif
|
||||
|
||||
sched = custom_target('scx_rustland',
|
||||
output: '@PLAINNAME@.__PHONY__',
|
||||
input: 'Cargo.toml',
|
||||
command: [cargo, 'build', '--manifest-path=@INPUT@', '--target-dir=@OUTDIR@',
|
||||
cargo_build_args],
|
||||
env: cargo_env,
|
||||
depends: [libbpf, bpftool_target, sched],
|
||||
depends: sched_deps,
|
||||
build_always_stale: true)
|
||||
|
@ -1,8 +1,14 @@
|
||||
if serialize
|
||||
sched_deps = [libbpf, bpftool_target, sched]
|
||||
else
|
||||
sched_deps = [libbpf, bpftool_target]
|
||||
endif
|
||||
|
||||
sched = custom_target('scx_rusty',
|
||||
output: '@PLAINNAME@.__PHONY__',
|
||||
input: 'Cargo.toml',
|
||||
command: [cargo, 'build', '--manifest-path=@INPUT@', '--target-dir=@OUTDIR@',
|
||||
cargo_build_args],
|
||||
env: cargo_env,
|
||||
depends: [libbpf, bpftool_target, sched],
|
||||
depends: sched_deps,
|
||||
build_always_stale: true)
|
||||
|
Loading…
Reference in New Issue
Block a user