mirror of
https://github.com/sched-ext/scx.git
synced 2026-12-03 23:30:51 +00:00
scx_utils currently appears in the build graph both as a build time
dependency and a runtime dependency. scx_utils has many dependencies and
features that are only used at runtime, which means we're building an
excess of code.
Complete the migration of `scx_utils::BpfBuilder` ->
`scx_cargo::BpfBuilder`. This ended up being a fairly simple move. Also
added imports of these to `scx_utils::BpfBuilder` to give people an
escape hatch.
This also removes the quite ugly `include!("clang_info.rs")` in
`scx_utils/build.rs`, which is a win.
Test plan:
- CI
```
# when a crate still uses scx_utils::BpfBuilder...
jake@merlin:/data/users/jake/repos/scx/ > cargo build
...
error[E0433]: failed to resolve: could not find `BpfBuilder` in `scx_utils`
--> tools/scxcash/build.rs:3:16
|
3 | scx_utils::BpfBuilder::new()
| ^^^^^^^^^^ could not find `BpfBuilder` in `scx_utils`
|
note: found an item that was configured out
--> /data/users/jake/repos/scx/rust/scx_utils/src/lib.rs:40:32
|
39 | #[cfg(feature = "deprecated-build-support")]
| ------------------------------------ the item is gated behind the `deprecated-build-support` feature
40 | pub use scx_cargo::{ClangInfo, BpfBuilder};
| ^^^^^^^^^^
For more information about this error, try `rustc --explain E0433`.
error: could not compile `scxcash` (build script) due to 1 previous error
```
Symbolic link
1 line
20 B
Plaintext
Symbolic link
1 line
20 B
Plaintext
../../scheds/include |