deps: gate selinux-related dependency set behind feat_selinux#12395
deps: gate selinux-related dependency set behind feat_selinux#12395xtqqczze wants to merge 1 commit into
Conversation
b21169d to
f2bc7bb
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
|
GNU testsuite comparison: |
| #[allow(clippy::match_same_arms)] | ||
| match krate.as_ref() { | ||
| #[cfg(not(any(target_os = "linux", target_os = "android")))] | ||
| #[cfg(not(all( |
There was a problem hiding this comment.
@cakebaker @oech3 This doesn't seem to be correct approach in build.rs, any ideas?
There was a problem hiding this comment.
I don't think cargo itself has solution satisfying everyone's requirements.
Someone might hope to see error with invalid combination of features (e.g, feat_selinux on macOS).
There was a problem hiding this comment.
#[cfg(...)] attributes are evaluated at compile time, but build.rs is compiled for and executed on the host machine, not the final target...
6bc9027 to
b1ad705
Compare
b1ad705 to
a41da3b
Compare
Follow-up #10360
The purpose of this change is to avoid pulling in Linux-specific dependencies such as
selinux-syswhenfeat_selinuxis not enabled, addressing the following TODO:coreutils/src/uu/chcon/Cargo.toml
Line 22 in 157bbab