Pass target to some run-make tests
<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.
This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using
r? <reviewer name>
-->
While trying to enable riscv64gc in https://github.com/rust-lang/rust/pull/125669, I noticed several tests failing in https://github.com/rust-lang/rust/actions/runs/9454116367/job/26040977376. I spoke a bit with `@pietroalbini` and he recommended this approach to resolving the issue.
This PR interacts with https://github.com/rust-lang/rust/pull/126279, and it is likely preferable that https://github.com/rust-lang/rust/pull/126279 merges and my changes in ae769f930e2510e57ed8bd379b1b2d393b2312c3 get removed from this PR.
## Testing
> [!NOTE]
> `riscv64gc-unknown-linux-gnu` is a [**Tier 2 with Host Tools** platform](https://doc.rust-lang.org/beta/rustc/platform-support.html), all tests may not necessarily pass! There is work in https://github.com/rust-lang/rust/pull/125220 which helps fix several related tests.
You can test out the renamed job:
```sh
DEPLOY=1 ./src/ci/docker/run.sh riscv64gc-gnu
```
`DEPLOY=1` helps reproduce the CI's environment and also avoids the chance of a `llvm-c/BitReader.h` error (detailed in https://github.com/rust-lang/rust/issues/85424 and https://github.com/rust-lang/rust/issues/56650).
<details>
<summary>tests/run-make/inaccessible-temp-dir failure</summary>
```bash
---- [run-make] tests/run-make/inaccessible-temp-dir stdout ----
# ...
--- stdout -------------------------------
# Create an inaccessible directory
mkdir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir/inaccessible
chmod 000 /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir/inaccessible
# Run rustc with `-Ztemps-dir` set to a directory
# *inside* the inaccessible one, so that it can't create it
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir -Ainternal_features -Clinker='riscv64-linux-gnu-gcc' program.rs -Ztemps-dir=/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir/inaccessible/tmp 2>&1 \
| "/checkout/src/etc/cat-and-grep.sh" 'failed to find or create the directory specified by `--temps-dir`'
[[[ begin stdout ]]]
error: linking with `riscv64-linux-gnu-gcc` failed: exit status: 1
|
= note: LC_ALL="C" PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" VSLANG="1033" "riscv64-linux-gnu-gcc" "-m64" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir/rustcHHUPmd/symbols.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir/inaccessible/tmp/program.program.45572bc5f2b14090-cgu.0.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir/inaccessible/tmp/program.dv9uftjrq86w5xa7l2eo7g9l7.rcgu.o" "-Wl,--as-needed" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-e6e3c30ae61f5a31.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-4f01f359c61a0a5e.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-02c7b58963139ffd.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-b66d5aea60ed3c58.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-5208f104036103e4.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-fdc5183e4f6dcbdd.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-eab0987d4aea0945.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-7ef07c8021adbf53.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-35ca031413717e66.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-9bf8f545a9224c8a.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-d6c6aeb7f3b89252.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-80de6049595b0062.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-49619208c34115e6.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-b4719719d9691028.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-279763368bc9fa45.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-86a2a7591afd1d37.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-d0bf37205fb9f76a.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-70719e8645e6f000.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-97c640fd5e54ed4c.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/inaccessible-temp-dir/inaccessible-temp-dir/program" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
= note: riscv64-linux-gnu-gcc: error: unrecognized command-line option '-m64'
error: aborting due to 1 previous error
[[[ end stdout ]]]
Error: cannot match: failed to find or create the directory specified by `--temps-dir`
------------------------------------------
--- stderr -------------------------------
make: *** [Makefile:26: all] Error 1
------------------------------------------
```
</details>
<details>
<summary>tests/run-make/issue-47551 failure</summary>
```bash
---- [run-make] tests/run-make/issue-47551 stdout ----
# ...
--- stdout -------------------------------
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/issue-47551/issue-47551:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/issue-47551/issue-47551 -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/issue-47551/issue-47551 -Ainternal_features -Clinker='riscv64-linux-gnu-gcc' eh_frame-terminator.rs
------------------------------------------
--- stderr -------------------------------
error: linking with `riscv64-linux-gnu-gcc` failed: exit status: 1
|
= note: LC_ALL="C" PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" VSLANG="1033" "riscv64-linux-gnu-gcc" "-m64" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/issue-47551/issue-47551/rustcL9WAHK/symbols.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/issue-47551/issue-47551/eh_frame-terminator.eh_frame_terminator.de96000750278472-cgu.0.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/issue-47551/issue-47551/eh_frame-terminator.11u7alf4d09fd9gei30vk4yzn.rcgu.o" "-Wl,--as-needed" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/issue-47551/issue-47551" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-e6e3c30ae61f5a31.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-4f01f359c61a0a5e.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-02c7b58963139ffd.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-b66d5aea60ed3c58.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-5208f104036103e4.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-fdc5183e4f6dcbdd.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-eab0987d4aea0945.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-7ef07c8021adbf53.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-35ca031413717e66.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-9bf8f545a9224c8a.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-d6c6aeb7f3b89252.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-80de6049595b0062.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-49619208c34115e6.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-b4719719d9691028.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-279763368bc9fa45.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-86a2a7591afd1d37.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-d0bf37205fb9f76a.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-70719e8645e6f000.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-97c640fd5e54ed4c.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/issue-47551/issue-47551/eh_frame-terminator" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
= note: riscv64-linux-gnu-gcc: error: unrecognized command-line option '-m64'
error: aborting due to 1 previous error
make: *** [Makefile:7: all] Error 1
------------------------------------------
failures:
[run-make] tests/run-make/inaccessible-temp-dir
[run-make] tests/run-make/issue-47551
test result: FAILED. 151 passed; 2 failed; 201 ignored; 0 measured; 0 filtered out; finished in 59.77s
Some tests failed in compiletest suite=run-make mode=run-make host=x86_64-unknown-linux-gnu target=riscv64gc-unknown-linux-gnu
Build completed unsuccessfully in 1:03:01
local time: Mon Jun 10 20:20:39 UTC 2024
network time: Mon, 10 Jun 2024 20:20:39 GMT
</details>
try-job: riscv64gc-gnu
|
||
|---|---|---|
| .. | ||
| a-b-a-linker-guard | ||
| alloc-no-oom-handling | ||
| alloc-no-rc | ||
| alloc-no-sync | ||
| allocator-shim-circular-deps | ||
| allow-warnings-cmdline-stability | ||
| archive-duplicate-names | ||
| arguments-non-c-like-enum | ||
| artifact-incr-cache | ||
| artifact-incr-cache-no-obj | ||
| atomic-lock-free | ||
| bare-outfile | ||
| box-struct-no-segfault | ||
| branch-protection-check-IBT | ||
| c-dynamic-dylib | ||
| c-dynamic-rlib | ||
| c-link-to-rust-dylib | ||
| c-link-to-rust-staticlib | ||
| c-link-to-rust-va-list-fn | ||
| c-static-dylib | ||
| c-static-rlib | ||
| c-unwind-abi-catch-lib-panic | ||
| c-unwind-abi-catch-panic | ||
| cat-and-grep-sanity-check | ||
| cdylib | ||
| cdylib-dylib-linkage | ||
| cdylib-fewer-symbols | ||
| codegen-options-parsing | ||
| comment-section | ||
| compile-stdin | ||
| compiler-builtins | ||
| compiler-lookup-paths | ||
| compiler-lookup-paths-2 | ||
| compiler-rt-works-on-mingw | ||
| compressed-debuginfo | ||
| const-prop-lint | ||
| const_fn_mir | ||
| core-no-fp-fmt-parse | ||
| core-no-oom-handling | ||
| crate-data-smoke | ||
| crate-hash-rustc-version | ||
| crate-name-priority | ||
| cross-lang-lto | ||
| cross-lang-lto-clang | ||
| cross-lang-lto-pgo-smoketest | ||
| cross-lang-lto-riscv-abi | ||
| cross-lang-lto-upstream-rlibs | ||
| CURRENT_RUSTC_VERSION | ||
| debug-assertions | ||
| debugger-visualizer-dep-info | ||
| dep-graph | ||
| dep-info | ||
| dep-info-doesnt-run-much | ||
| dep-info-spaces | ||
| deref-impl-rustdoc-ice | ||
| doctests-keep-binaries | ||
| doctests-runtool | ||
| dump-ice-to-disk | ||
| dump-mono-stats | ||
| duplicate-output-flavors | ||
| dylib-chain | ||
| emit | ||
| emit-named-files | ||
| emit-path-unhashed | ||
| emit-shared-files | ||
| emit-stack-sizes | ||
| emit-to-stdout | ||
| env-dep-info | ||
| error-found-staticlib-instead-crate | ||
| error-writing-dependencies | ||
| exit-code | ||
| export-executable-symbols | ||
| extern-diff-internal-name | ||
| extern-flag-disambiguates | ||
| extern-flag-fun | ||
| extern-flag-pathless | ||
| extern-flag-rename-transitive | ||
| extern-fn-explicit-align | ||
| extern-fn-generic | ||
| extern-fn-mangle | ||
| extern-fn-reachable | ||
| extern-fn-struct-passing-abi | ||
| extern-fn-with-extern-types | ||
| extern-fn-with-packed-struct | ||
| extern-fn-with-union | ||
| extern-multiple-copies | ||
| extern-multiple-copies2 | ||
| extern-overrides-distribution | ||
| external-crate-panic-handle-no-lint | ||
| extra-filename-with-temp-outputs | ||
| fmt-write-bloat | ||
| forced-unwind-terminate-pof | ||
| foreign-double-unwind | ||
| foreign-exceptions | ||
| foreign-rust-exceptions | ||
| glibc-staticlib-args | ||
| inaccessible-temp-dir | ||
| include_bytes_deps | ||
| incr-add-rust-src-component | ||
| incr-foreign-head-span | ||
| incr-prev-body-beyond-eof | ||
| incremental-debugger-visualizer | ||
| incremental-session-fail | ||
| inline-always-many-cgu | ||
| interdependent-c-libraries | ||
| intrinsic-unreachable | ||
| invalid-library | ||
| invalid-so | ||
| invalid-staticlib | ||
| issue-10971-temps-dir | ||
| issue-14698 | ||
| issue-15460 | ||
| issue-18943 | ||
| issue-20626 | ||
| issue-22131 | ||
| issue-25581 | ||
| issue-26006 | ||
| issue-26092 | ||
| issue-28595 | ||
| issue-33329 | ||
| issue-35164 | ||
| issue-36710 | ||
| issue-37839 | ||
| issue-40535 | ||
| issue-47384 | ||
| issue-47551 | ||
| issue-51671 | ||
| issue-64153 | ||
| issue-68794-textrel-on-minimal-lib | ||
| issue-69368 | ||
| issue-83045 | ||
| issue-83112-incr-test-moved-file | ||
| issue-84395-lto-embed-bitcode | ||
| issue-85019-moved-src-dir | ||
| issue-85401-static-mir | ||
| issue-88756-default-output | ||
| issue-97463-abi-param-passing | ||
| issue-107094 | ||
| issue-107495-archive-permissions | ||
| issue-109934-lto-debuginfo | ||
| issue-125484-used-dependencies | ||
| jobserver-error | ||
| libs-through-symlinks | ||
| libtest-json | ||
| libtest-junit | ||
| libtest-padding | ||
| libtest-thread-limit | ||
| link-arg | ||
| link-args-order | ||
| link-cfg | ||
| link-dedup | ||
| link-framework | ||
| link-path-order | ||
| linkage-attr-on-static | ||
| llvm-ident | ||
| llvm-outputs | ||
| long-linker-command-lines | ||
| long-linker-command-lines-cmd-exe | ||
| longjmp-across-rust | ||
| ls-metadata | ||
| lto-dylib-dep | ||
| lto-empty | ||
| lto-linkage-used-attr | ||
| lto-no-link-whole-rlib | ||
| lto-readonly-lib | ||
| lto-smoke | ||
| lto-smoke-c | ||
| macos-deployment-target | ||
| macos-fat-archive | ||
| manual-crate-name | ||
| manual-link | ||
| many-crates-but-no-match | ||
| metadata-dep-info | ||
| metadata-flag-frobs-symbols | ||
| min-global-align | ||
| mingw-export-call-convention | ||
| mismatching-target-triples | ||
| missing-crate-dependency | ||
| mixing-deps | ||
| mixing-formats | ||
| mixing-libs | ||
| msvc-opt-minsize | ||
| multiple-emits | ||
| native-link-modifier-bundle | ||
| native-link-modifier-verbatim-linker | ||
| native-link-modifier-verbatim-rustc | ||
| native-link-modifier-whole-archive | ||
| no-alloc-shim | ||
| no-builtins-attribute | ||
| no-builtins-lto | ||
| no-cdylib-as-rdylib | ||
| no-duplicate-libs | ||
| no-input-file | ||
| no-intermediate-extras | ||
| non-pie-thread-local | ||
| non-unicode-env | ||
| non-unicode-in-incremental-dir | ||
| notify-all-emit-artifacts | ||
| obey-crate-type-flag | ||
| optimization-remarks-dir | ||
| optimization-remarks-dir-pgo | ||
| output-filename-conflicts-with-directory | ||
| output-filename-overwrites-input | ||
| output-type-permutations | ||
| output-with-hyphens | ||
| override-aliased-flags | ||
| overwrite-input | ||
| panic-abort-eh_frame | ||
| panic-impl-transitive | ||
| pass-linker-flags | ||
| pass-linker-flags-flavor | ||
| pass-linker-flags-from-dep | ||
| pass-non-c-like-enum-to-c | ||
| pdb-alt-path | ||
| pdb-buildinfo-cl-cmd | ||
| pgo-branch-weights | ||
| pgo-gen | ||
| pgo-gen-lto | ||
| pgo-gen-no-imp-symbols | ||
| pgo-indirect-call-promotion | ||
| pgo-use | ||
| pointer-auth-link-with-c | ||
| prefer-dylib | ||
| prefer-rlib | ||
| pretty-print-to-file | ||
| pretty-print-with-dep-file | ||
| print-calling-conventions | ||
| print-cfg | ||
| print-check-cfg | ||
| print-native-static-libs | ||
| print-target-list | ||
| print-to-output | ||
| proc-macro-init-order | ||
| profile | ||
| prune-link-args | ||
| raw-dylib-alt-calling-convention | ||
| raw-dylib-c | ||
| raw-dylib-cross-compilation | ||
| raw-dylib-custom-dlltool | ||
| raw-dylib-import-name-type | ||
| raw-dylib-inline-cross-dylib | ||
| raw-dylib-link-ordinal | ||
| raw-dylib-stdcall-ordinal | ||
| reachable-extern-fn-available-lto | ||
| redundant-libs | ||
| relocation-model | ||
| relro-levels | ||
| remap-path-prefix | ||
| remap-path-prefix-dwarf | ||
| repr128-dwarf | ||
| reproducible-build | ||
| reproducible-build-2 | ||
| reset-codegen-1 | ||
| resolve-rename | ||
| return-non-c-like-enum | ||
| return-non-c-like-enum-from-c | ||
| rlib-chain | ||
| rlib-format-packed-bundled-libs | ||
| rlib-format-packed-bundled-libs-2 | ||
| rlib-format-packed-bundled-libs-3 | ||
| rmeta-preferred | ||
| run-in-tmpdir-self-test | ||
| rust-lld | ||
| rust-lld-by-default | ||
| rust-lld-custom-target | ||
| rustc-macro-dep-files | ||
| rustdoc-determinism | ||
| rustdoc-error-lines | ||
| rustdoc-io-error | ||
| rustdoc-map-file | ||
| rustdoc-output-path | ||
| rustdoc-scrape-examples-invalid-expr | ||
| rustdoc-scrape-examples-macros | ||
| rustdoc-scrape-examples-multiple | ||
| rustdoc-scrape-examples-ordering | ||
| rustdoc-scrape-examples-remap | ||
| rustdoc-scrape-examples-test | ||
| rustdoc-scrape-examples-whitespace | ||
| rustdoc-shared-flags | ||
| rustdoc-target-spec-json-path | ||
| rustdoc-test-args | ||
| rustdoc-themes | ||
| rustdoc-verify-output-files | ||
| rustdoc-with-out-dir-option | ||
| rustdoc-with-output-option | ||
| rustdoc-with-short-out-dir-option | ||
| sanitizer-cdylib-link | ||
| sanitizer-dylib-link | ||
| sanitizer-staticlib-link | ||
| separate-link | ||
| separate-link-fail | ||
| sepcomp-cci-copies | ||
| sepcomp-inlining | ||
| sepcomp-separate | ||
| share-generics-dylib | ||
| share-generics-export-again | ||
| short-ice | ||
| silly-file-names | ||
| simd-ffi | ||
| split-debuginfo | ||
| stable-symbol-names | ||
| static-dylib-by-default | ||
| static-extern-type | ||
| static-pie | ||
| static-unwinding | ||
| staticlib-blank-lib | ||
| staticlib-dylib-linkage | ||
| std-core-cycle | ||
| stdin-rustc | ||
| stdin-rustdoc | ||
| suspicious-library | ||
| symbol-mangling-hashed | ||
| symbol-visibility | ||
| symbols-include-type-name | ||
| symlinked-extern | ||
| symlinked-libraries | ||
| symlinked-rlib | ||
| sysroot-crates-are-unstable | ||
| target-cpu-native | ||
| target-specs | ||
| target-without-atomic-cas | ||
| test-benches | ||
| test-harness | ||
| thumb-none-cortex-m | ||
| thumb-none-qemu | ||
| track-path-dep-info | ||
| track-pgo-dep-info | ||
| translation | ||
| type-mismatch-same-crate-name | ||
| unknown-mod-stdin | ||
| unstable-flag-required | ||
| use-suggestions-rust-2018 | ||
| used | ||
| used-cdylib-macos | ||
| volatile-intrinsics | ||
| wasm-abi | ||
| wasm-custom-section | ||
| wasm-custom-sections-opt | ||
| wasm-exceptions-nostd | ||
| wasm-export-all-symbols | ||
| wasm-import-module | ||
| wasm-override-linker | ||
| wasm-panic-small | ||
| wasm-spurious-import | ||
| wasm-stringify-ints-small | ||
| wasm-symbols-different-module | ||
| wasm-symbols-not-exported | ||
| wasm-symbols-not-imported | ||
| weird-output-filenames | ||
| windows-binary-no-external-deps | ||
| windows-safeseh | ||
| windows-spawn | ||
| windows-ws2_32 | ||
| x86_64-fortanix-unknown-sgx-lvi | ||
| git_clone_sha1.sh | ||
| README.md | ||
| tools.mk | ||
The run-make test suite
The run-make test suite contains tests which are the most flexible out of all
the rust-lang/rust test suites. run-make
tests can basically contain arbitrary code, and are supported by the
run_make_support library.
Infrastructure
There are two kinds of run-make tests:
- The new
rmake.rsversion: this allows run-make tests to be written in Rust (withrmake.rsas the main test file). - The legacy
Makefileversion: this is what run-make tests were written with before support forrmake.rswas introduced.
The implementation for collecting and building the rmake.rs recipes (or
Makefiles) are in
src/tools/compiletest/src/runtest.rs,
in run_rmake_v2_test and run_rmake_legacy_test.
Rust-based run-make tests: rmake.rs
The setup for the rmake.rs version is a 3-stage process:
-
First, we build the
run_make_supportlibrary in bootstrap as a tool lib. -
Then, we compile the
rmake.rs"recipe" linking the support library and its dependencies in, and provide a bunch of env vars. We setup a directory structure withinbuild/<target>/test/run-make/<test-name>/ rmake.exe # recipe binary rmake_out/ # sources from test sources copied overand copy non-
rmake.rsinput support files over tormake_out/. The support library is made available as an extern prelude. -
Finally, we run the recipe binary and set
rmake_out/as the working directory.