Unify sysroot_target_{bin,lib}dir
handling by jieyouxu · Pull Request #132723 · rust-lang/rust (original) (raw)
Follow-up to #131405 (comment) where sysroot_target_bindir
had to do some dancing because the sysroot ensure logic embedded in sysroot_target_libdir
returned $sysroot/$relative_lib/rustlib/$target/lib
and not the rustlib
parent $sysroot/$relative_lib/rustlib/
.
This PR pulls out the sysroot ensure logic into a helper, and return $sysroot/$relative_lib/rustlib/
instead so sysroot_target_bindir
doesn't have to do parent traversal from the path returned from sysroot_target_libdir
, and also make them easier to follow in that they are now clearly closely related based on the common target sysroot ensure logic.