diff options
| author | DevJPM <DevJPM@users.noreply.github.com> | 2020-10-26 19:04:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-26 18:04:47 +0000 |
| commit | d39189a4c93cd63e3de3c1ce1f9a1c139b83b9aa (patch) | |
| tree | f429cb6c60058f284b7597bc87bad5422ec8f8c8 | |
| parent | e020a85ff0dcf02adbc32bfee10281819519bcf3 (diff) | |
| download | rust-d39189a4c93cd63e3de3c1ce1f9a1c139b83b9aa.tar.gz rust-d39189a4c93cd63e3de3c1ce1f9a1c139b83b9aa.zip | |
Updated CONTRIBUTING.MD for new package name and environment variables (#930)
| -rw-r--r-- | library/stdarch/CONTRIBUTING.md | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/library/stdarch/CONTRIBUTING.md b/library/stdarch/CONTRIBUTING.md index 85b7bb474fc..ebccd73eac2 100644 --- a/library/stdarch/CONTRIBUTING.md +++ b/library/stdarch/CONTRIBUTING.md @@ -6,17 +6,14 @@ probably want to check out the repository and make sure that tests pass for you: ``` $ git clone https://github.com/rust-lang/stdarch $ cd stdarch -$ cargo +nightly test +$ TARGET="<your-target-arch>" ci/run.sh ``` -To run codegen tests, run in release mode: +Where `<your-target-arch>` is the target triple as used by `rustup`, e.g. `x86_x64-unknown-linux-gnu` (without any preceding `nightly-` or similar). +Also remember that this repository requires the nightly channel of Rust! +The above tests do in fact require nightly rust to be the default on your system, to set that use `rustup default nightly` (and `rustup default stable` to revert). -``` -$ cargo +nightly test --release -p coresimd -``` - -Remember that this repository requires the nightly channel of Rust! If any of -the above steps don't work, [please let us know][new]! +If any of the above steps don't work, [please let us know][new]! Next up you can [find an issue][issues] to help out on, we've selected a few with the [`help wanted`][help] and [`impl-period`][impl] tags which could @@ -71,6 +68,21 @@ of the [Rust Book] describes the `rustdoc` syntax quite well. As always, feel fr to [join us on gitter][gitter] and ask us if you hit any snags, and thank you for helping to improve the documentation of `stdarch`! +# Alternative Testing Instructions + +It is generally recommended that you use `ci/run.sh` to run the tests. +However this might not work for you, e.g. if you are on Windows. + +In that case you can fall back to running `cargo +nightly test` and `cargo +nightly test --release -p core_arch` for testing the code generation. +Note that these require the nightly toolchain to be installed and for `rustc` to know about your target triple and its CPU. +In particular you need to set the `TARGET` environment variable as you would for `ci/run.sh`. +In addition you need to set `RUSTCFLAGS` (need the `C`) to indicate target features, e.g. `RUSTCFLAGS="-C -target-features=+avx2"`. +You can also set `-C -target-cpu=native` if you're "just" developing against your current CPU. + +Be warned that when you use these alternative instructions, [things may go less smoothly than they would with `ci/run.sh`][ci-run-good], e.g. instruction generation tests may fail because the disassembler named them differently, e.g. it may generate `vaesenc` instead of `aesenc` instructions despite them behaving the same. +Also these instructions execute less tests than would normally be done, so don't be surprised that when you eventually pull-request some errors may show up for tests not covered here. + + [new]: https://github.com/rust-lang/stdarch/issues/new [issues]: https://github.com/rust-lang/stdarch/issues [help]: https://github.com/rust-lang/stdarch/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22 @@ -78,3 +90,4 @@ to improve the documentation of `stdarch`! [vendor]: https://github.com/rust-lang/stdarch/issues/40 [Documentation as tests]: https://doc.rust-lang.org/book/first-edition/documentation.html#documentation-as-tests [Rust Book]: https://doc.rust-lang.org/book/first-edition +[ci-run-good]: https://github.com/rust-lang/stdarch/issues/931#issuecomment-711412126 |
