Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR moves the
std_detect
crate fromstdarch
to be a part of rust-lang/rust instead.The first commit actually moves the whole directory from the stdarch Josh subtree, so that git blame history is kept intact. Then I had to make a few changes to appease
tidy
.The most complex thing here is porting the tests. We can't have
std_detect
both in r-l/r and stdarch, because they could get desynchronized, so we have to perform the move more or less "atomically", which means that we also have to port all the existingstd_detect
tests from thestdarch
repository.The stdarch repo runs the following
std_detect
tests:Build
The
build-std-detect.sh
script (https://github.com/rust-lang/stdarch/blob/e2b6512aed87df45294ae680181eeef7a802cd95/ci/build-std-detect.sh) buildsstd_detect
using the nightly compiler for several targets. This will be subsumed by normalx build library
on our Tier 1/2 targets. However, the stdarch repository also tests the following targets:Which we don't build/test on our CI currently. I think we have mostly two options here:
std_detect
crate?) for these targets.Documentation
The
dox.sh
script (https://github.com/rust-lang/stdarch/blob/3fec5adcd52a815f227805d4959a25b6402c7fd5/ci/dox.sh) builds and documentsstd_detect
for several targets. All of them are Tier 2/we havedist-
jobs for them, so I think that we can just skip this and let our normal CI subsume it?Tests
The
run.sh
script (https://github.com/rust-lang/stdarch/blob/1b201cec2cca7465602a65ed6ae60517224b15f3/ci/run.sh) runscargo test
onstd_detect
with a bunch of variations of feature flags. This will be subsumed byx test library
in our CI. The only problem is thatstdarch
runs these tests for a ludicrous number of targets:We definitely do not run tests for all of these targets on our CI. So maybe include them into the special job that will cross-compile std_detect for Free/OpenBSD?
r? @ghost