compiletest: add a proper supports-crate-type: xxx directive (original) (raw)

Apparently needs-dynamic-linking is not equivalent to checking if dylib or cdylib crate types are supported.

Originally posted by @jieyouxu in #130860 (comment)