Skip to content

Commit 57c71ff

Browse files
committed
---
yaml --- r: 216327 b: refs/heads/stable c: 5f518ad h: refs/heads/master i: 216325: 7205a54 216323: 2e29ca2 216319: f42ac85 v: v3
1 parent cbfc55b commit 57c71ff

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ refs/heads/tmp: 378a370ff2057afeb1eae86eb6e78c476866a4a6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: a5286998df566e736b32f6795bfc3803bdaf453d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 6c048723f83fad6c96c2e19d6dfa1db547371c11
32+
refs/heads/stable: 5f518ad658fe3914f3817285c484409a582cba96
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375

branches/stable/src/compiletest/runtest.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,20 @@ fn compose_and_run_compiler(config: &Config, props: &TestProps,
12331233
let mut crate_type = if aux_props.no_prefer_dynamic {
12341234
Vec::new()
12351235
} else {
1236-
vec!("--crate-type=dylib".to_string())
1236+
// We primarily compile all auxiliary libraries as dynamic libraries
1237+
// to avoid code size bloat and large binaries as much as possible
1238+
// for the test suite (otherwise including libstd statically in all
1239+
// executables takes up quite a bit of space).
1240+
//
1241+
// For targets like MUSL, however, there is no support for dynamic
1242+
// libraries so we just go back to building a normal library. Note,
1243+
// however, that if the library is built with `force_host` then it's
1244+
// ok to be a dylib as the host should always support dylibs.
1245+
if config.target.contains("musl") && !aux_props.force_host {
1246+
vec!("--crate-type=lib".to_string())
1247+
} else {
1248+
vec!("--crate-type=dylib".to_string())
1249+
}
12371250
};
12381251
crate_type.extend(extra_link_args.clone().into_iter());
12391252
let aux_args =

0 commit comments

Comments
 (0)