Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scheds-rust: build rust schedulers in sequence #236

Merged
merged 2 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions scheds/rust/meson.build
Original file line number Diff line number Diff line change
@@ -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:
takase1121 marked this conversation as resolved.
Show resolved Hide resolved
#
# 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)
5 changes: 3 additions & 2 deletions scheds/rust/scx_lavd/meson.build
Original file line number Diff line number Diff line change
@@ -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],
takase1121 marked this conversation as resolved.
Show resolved Hide resolved
build_always_stale: true)
6 changes: 3 additions & 3 deletions scheds/rust/scx_layered/meson.build
Original file line number Diff line number Diff line change
@@ -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)
6 changes: 3 additions & 3 deletions scheds/rust/scx_rlfifo/meson.build
Original file line number Diff line number Diff line change
@@ -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)
6 changes: 3 additions & 3 deletions scheds/rust/scx_rustland/meson.build
Original file line number Diff line number Diff line change
@@ -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)
6 changes: 3 additions & 3 deletions scheds/rust/scx_rusty/meson.build
Original file line number Diff line number Diff line change
@@ -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)