avoid dynamic linking on targets that do not support dynamic linking
This commit is contained in:
parent
a56c829e74
commit
04f658f3d3
@ -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 @@ fn build_auxiliary(&self, source_path: &str, aux_dir: &Path) -> bool {
|
||||
|| 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…
Reference in New Issue
Block a user