scheds-rust: build rust schedulers in sequence

This commit is contained in:
takase1121 2024-04-23 08:06:27 +08:00
parent 7b4d231af5
commit 5d20f89a87
No known key found for this signature in database
GPG Key ID: 60EEFFC68EB3031B
6 changed files with 33 additions and 14 deletions

View File

@ -1,5 +1,23 @@
# the previous scheduler in the compile sequence
sched = []
# to add a new scheduler, assign the output of your custom_target to sched
# and add sched as a dependency to your custom_target. For example:
#
# sched = custom_target('scx_mysched',
# ...
# depends: [mydep, sched],
# build_always_stale: true)
subdir('scx_layered')
subdir('scx_rusty')
subdir('scx_rustland')
subdir('scx_rlfifo')
subdir('scx_lavd')
# the target to compile all rust schedulers
custom_target('rust_scheds',
input: 'meson.build',
output: '@PLAINNAME@.__PHONY__',
command: ['touch', '@PLAINNAME@.__PHONY__'],
depends: sched,
build_by_default: true)

View File

@ -1,7 +1,8 @@
custom_target('scx_lavd',
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,
build_by_default: true)
depends: [sched],
build_always_stale: true)

View File

@ -1,8 +1,8 @@
custom_target('scx_layered',
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],
build_by_default: true)
depends: [libbpf, bpftool_target, sched],
build_always_stale: true)

View File

@ -1,8 +1,8 @@
custom_target('scx_rlfifo',
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],
build_by_default: true)
depends: [libbpf, bpftool_target, sched],
build_always_stale: true)

View File

@ -1,8 +1,8 @@
custom_target('scx_rustland',
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],
build_by_default: true)
depends: [libbpf, bpftool_target, sched],
build_always_stale: true)

View File

@ -1,8 +1,8 @@
custom_target('scx_rusty',
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],
build_by_default: true)
depends: [libbpf, bpftool_target, sched],
build_always_stale: true)