You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Partial fix for #6591
The code contained a workaround to enforce that libstdbuf was compiled before stdbuf:
it was declaring libstdbuf as a build-dependency of stdbuf. This broke cross-compilation,
because build-dependencies were compiled for the host architecture, and not for the target architecture.
Changes:
1. Removed cpp/cpp_build dependencies:
The cpp, cpp_build, and related dependencies were removed.
The build system no longer uses the C++-based approach for building libstdbuf, because cross-compiling c++ in a build.rs file
would have added a lot of complexity.
2. Build libstdbuf as a separate Rust crate using Cargo, to make cross-compilation work.
In the future, "bindeps" could be used to simplify the code, however this is available only in cargo nightly
at the moment.
The ctor crate is now used to provide constructor attributes for initialization.
3. Remove "feat_require_crate_cpp" which is not needed any more, since stdbuf was the only utility using the cpp crate.
4. Switched from C++/cpp macro-based initialization to using the Rust ctor crate for library initialization.
Provided Rust implementations for getting stdin, stdout, and stderr pointers.
Tests:
This commit fixes this test:
cross test --target aarch64-unknown-linux-gnu --features stdbuf test_stdbuf::test_setvbuf_resolution -- --nocapture
Signed-off-by: Etienne Cordonnier <[email protected]>
0 commit comments