avoid dynamic linking on targets that do not support dynamic linking
This commit is contained in:
parent
a56c829e74
commit
04f658f3d3
2 changed files with 3 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue