wc: support cross-platform building and 32-bit#11452
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
Just to make the if more correct, although it won't build it |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
I added it |
|
plenty of jobs are failing |
Because of the feature, I missed one during testing, and now I've added it. |
|
GNU testsuite comparison: |
|
It is not clear for me how is this PR(diff) related with 32bit. uutils's CI is already running jobs for 32bit targets. |
libc::mode_t is u16 on 32-bit and u32 on 64-bit (on Android),but st_mode is always u32 (c_uint), so I fixed it |
|
Do you actuall need 1 line diff only for it? |
I only found this one error during compilation, and after fixing it, all Android targets can be compiled |
|
Please reduce diff to 1 line if it is enough and squash commits. Other refactoring conflicts with other PRs. |
Co-Authored-By: 白彩恋 <169267914+shirorren@users.noreply.github.com>
Done |
|
GNU testsuite comparison: |
Merging this PR will degrade performance by 14.62%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | sort_ascii_utf8_locale |
16.1 ms | 15.4 ms | +4.84% |
| ❌ | Simulation | true_consecutive_calls |
170.3 ns | 199.4 ns | -14.62% |
| ❌ | Simulation | false_consecutive_calls |
170.3 ns | 199.4 ns | -14.62% |
Comparing OOM-WG:main (7b88683) with main (230e0cf)
Footnotes
-
46 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
|
Thanks! |
However, this will still not solve cross-platform compilation, using MSVC to compile stdbuf will still fail |
|
Windows does not have same system with LD_PRELOAD. So building it does not making a sense.
|
What I mean is that cross-platform builds will fail, for example, building for Android on Windows, because the build script checks the current platform rather than the platform to be built |
|
Oh sorry. Yes, build.rs uses cfg
|
Commit By @ShIroRRen