sched-ext / scx

sched_ext schedulers and tools
https://bit.ly/scx_slack
GNU General Public License v2.0
691 stars 48 forks source link

meson: introduce serialize build option #399

Closed arighi closed 1 week ago

arighi commented 1 week ago

With commit 5d20f89a ("scheds-rust: build rust schedulers in sequence"), schedulers are now built serially one after the other to prevent meson and cargo from forking NxN parallel tasks.

However, this change has made building a single scheduler much more cumbersome, due to the chain of dependencies.

For example, building scx_rusty using the specific meson target would still result in all schedulers being built, because they all depend on each other.

To address this issue, introduce the new meson build option serialize=true|false (default is false).

This option allows to disable the schedulers' build chain, restoring the old behavior.

With this option enabled, it is now possible to build just a single scheduler, parallelizing the cargo build properly, without triggering the build of the others. Example:

$ meson setup build -Dbuildtype=release -Dserialize=false $ meson compile -C build scx_rusty