Skip to content

Commit 04f658f

Browse files
committed
avoid dynamic linking on targets that do not support dynamic linking
1 parent a56c829 commit 04f658f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/tools/compiletest/src/common.rs

+2
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,8 @@ pub struct TargetCfg {
542542
endian: Endian,
543543
#[serde(rename = "panic-strategy", default)]
544544
pub(crate) panic: PanicStrategy,
545+
#[serde(default)]
546+
pub(crate) dynamic_linking: bool,
545547
}
546548

547549
impl TargetCfg {

src/tools/compiletest/src/runtest.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1810,8 +1810,8 @@ impl<'test> TestCx<'test> {
18101810
|| self.config.target.contains("wasm32")
18111811
|| self.config.target.contains("nvptx")
18121812
|| self.is_vxworks_pure_static()
1813-
|| self.config.target.contains("sgx")
18141813
|| self.config.target.contains("bpf")
1814+
|| !self.config.target_cfg().dynamic_linking
18151815
{
18161816
// We primarily compile all auxiliary libraries as dynamic libraries
18171817
// to avoid code size bloat and large binaries as much as possible

0 commit comments

Comments
 (0)