Skip to content

Commit

Permalink
avoid dynamic linking on targets that do not support dynamic linking
Browse files Browse the repository at this point in the history
  • Loading branch information
pietroalbini committed Jun 20, 2023
1 parent a56c829 commit 04f658f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/tools/compiletest/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,8 @@ pub struct TargetCfg {
endian: Endian,
#[serde(rename = "panic-strategy", default)]
pub(crate) panic: PanicStrategy,
#[serde(default)]
pub(crate) dynamic_linking: bool,
}

impl TargetCfg {
Expand Down
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1810,8 +1810,8 @@ impl<'test> TestCx<'test> {
|| self.config.target.contains("wasm32")
|| self.config.target.contains("nvptx")
|| self.is_vxworks_pure_static()
|| self.config.target.contains("sgx")
|| self.config.target.contains("bpf")
|| !self.config.target_cfg().dynamic_linking
{
// We primarily compile all auxiliary libraries as dynamic libraries
// to avoid code size bloat and large binaries as much as possible
Expand Down

0 comments on commit 04f658f

Please sign in to comment.