compiletest: add a proper supports-crate-type: dylib
directive
#132309
Labels
A-compiletest
Area: The compiletest test runner
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-medium
Call for participation: Medium difficulty. Experience needed to fix: Intermediate.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Apparently
needs-dynamic-linking
is not equivalent to checking if dylib or cdylib crate types are supported.needs-dynamic-linking
performs a check based on target cfg'sdynamic_linking
field +--print=cfg --target $TARGET
.only_cdylib
which, ifdynamic_linking
istrue
, indicates that onlycdylib
crate type is supported and notdylib
.rust/compiler/rustc_target/src/spec/mod.rs
Lines 2148 to 2153 in f2becdf
wasm
base, dynamic linking is supported but notdylib
crate type, onlycdylib
is supported.rust/compiler/rustc_target/src/spec/base/wasm.rs
Lines 58 to 62 in f2becdf
Originally posted by @jieyouxu in #130860 (comment)
The text was updated successfully, but these errors were encountered: