about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm_util.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-12-30 15:44:03 +0000
committerbors <bors@rust-lang.org>2024-12-30 15:44:03 +0000
commit93722f7ed56bcf27839a6355074095c4320b7d37 (patch)
tree403add0af4ea12bb4e0972fe1ad83304af86aec6 /compiler/rustc_codegen_llvm/src/llvm_util.rs
parentf95c9967506712bdf8e86b08d8b17accbde2d985 (diff)
parent92e8e84e7d85a17e8c32a9c6874fa5e655c16872 (diff)
downloadrust-93722f7ed56bcf27839a6355074095c4320b7d37.tar.gz
rust-93722f7ed56bcf27839a6355074095c4320b7d37.zip
Auto merge of #134906 - jieyouxu:multi-crate-type, r=lqd,fmease
tests: add basic test coverage for stable `--crate-type` flag

I experimented locally with making the compiler panic if multiple crate types are passed to a single `--crate-type` flag, and it turns out not only does the compiler successfully bootstrap, only two ui tests failed:

```
failures:
    [ui] tests/ui/sepcomp/sepcomp-lib.rs
    [ui] tests/ui/sepcomp/sepcomp-lib-lto.rs

test result: FAILED. 4 passed; 2 failed; 18181 ignored; 0 measured; 0 filtered out; finished in 364.55ms
```

These are not specific tests for the `--crate-type` flag, only their auxiliary *happens* to use a `--crate-type` with two crate types:

```rs
//@ compile-flags: -C codegen-units=3 --crate-type=rlib,dylib -g
```

I was not able to find a specific test in run-make test suite either.

So this PR tries to add some basic test coverage for the stable `--crate-type` flag's interface (including to check that `--crate-type` accepts multiple crate types), since I imagine it might be slightly awkward if we accidentally regressed this.

r? compiler
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
0 files changed, 0 insertions, 0 deletions