compiletest: add a proper supports-crate-type: xxx
directive · Issue #132309 · rust-lang/rust (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
Apparently needs-dynamic-linking
is not equivalent to checking if dylib or cdylib crate types are supported.
- In compiletest,
needs-dynamic-linking
performs a check based on target cfg'sdynamic_linking
field +--print=cfg --target $TARGET
. - However, target cfg has an additional field
only_cdylib
which, ifdynamic_linking
istrue
, indicates that onlycdylib
crate type is supported and notdylib
./// Whether dynamic linking is available on this target. Defaults to false. pub dynamic_linking: bool, /// Whether dynamic linking can export TLS globals. Defaults to true. pub dll_tls_export: bool, /// If dynamic linking is available, whether only cdylibs are supported. pub only_cdylib: bool, - This is the case for
wasm
base, dynamic linking is supported but notdylib
crate type, onlycdylib
is supported.// we allow dynamic linking, but only cdylibs. Basically we allow a // final library artifact that exports some symbols (a wasm module) but // we don't allow intermediate `dylib` crate types dynamic_linking: true, only_cdylib: true,
- This is the case for
Originally posted by @jieyouxu in #130860 (comment)