提交 5f518ad6 编写于 作者: A Alex Crichton

compiletest: Don't force dylibs on musl

MUSL support is currently only with static builds, so building a dylib will
always fail.
上级 6c048723
......@@ -1233,7 +1233,20 @@ fn compose_and_run_compiler(config: &Config, props: &TestProps,
let mut crate_type = if aux_props.no_prefer_dynamic {
Vec::new()
} else {
vec!("--crate-type=dylib".to_string())
// We primarily compile all auxiliary libraries as dynamic libraries
// to avoid code size bloat and large binaries as much as possible
// for the test suite (otherwise including libstd statically in all
// executables takes up quite a bit of space).
//
// For targets like MUSL, however, there is no support for dynamic
// libraries so we just go back to building a normal library. Note,
// however, that if the library is built with `force_host` then it's
// ok to be a dylib as the host should always support dylibs.
if config.target.contains("musl") && !aux_props.force_host {
vec!("--crate-type=lib".to_string())
} else {
vec!("--crate-type=dylib".to_string())
}
};
crate_type.extend(extra_link_args.clone().into_iter());
let aux_args =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册