From c7a80fa78199e5d9538c30c2c6476f914a2e2624 Mon Sep 17 00:00:00 2001 From: devil-ira Date: Sun, 22 Jan 2023 20:53:16 +0100 Subject: [PATCH] Fix! --- Cargo.toml | 2 +- crates/bevy_diagnostic/Cargo.toml | 3 +++ .../src/system_information_diagnostics_plugin.rs | 4 ++-- crates/bevy_internal/Cargo.toml | 3 +++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 547846e5fc45d..721cf4c518358 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,7 +48,7 @@ default = [ ] # Force dynamic linking, which improves iterative compile times -dynamic = ["bevy_dylib"] +dynamic = ["bevy_dylib", "bevy_internal/dynamic"] # Optional bevy crates bevy_animation = ["bevy_internal/bevy_animation"] diff --git a/crates/bevy_diagnostic/Cargo.toml b/crates/bevy_diagnostic/Cargo.toml index 7bd1249cbefaa..31a35fcecae95 100644 --- a/crates/bevy_diagnostic/Cargo.toml +++ b/crates/bevy_diagnostic/Cargo.toml @@ -8,6 +8,9 @@ repository = "https://github.com/bevyengine/bevy" license = "MIT OR Apache-2.0" keywords = ["bevy"] +[features] +# Disables diagnostics that are unsupported when Bevy is dynamically linked +dynamic = [] [dependencies] # bevy diff --git a/crates/bevy_diagnostic/src/system_information_diagnostics_plugin.rs b/crates/bevy_diagnostic/src/system_information_diagnostics_plugin.rs index 464fc06693da0..0dd103f8efd18 100644 --- a/crates/bevy_diagnostic/src/system_information_diagnostics_plugin.rs +++ b/crates/bevy_diagnostic/src/system_information_diagnostics_plugin.rs @@ -34,7 +34,7 @@ impl SystemInformationDiagnosticsPlugin { target_os = "android", target_os = "macos" ), - not(feature = "bevy_dynamic_plugin") + not(feature = "dynamic") ))] pub mod internal { use bevy_ecs::{prelude::ResMut, system::Local}; @@ -142,7 +142,7 @@ pub mod internal { target_os = "android", target_os = "macos" ), - not(feature = "bevy_dynamic_plugin") + not(feature = "dynamic") )))] pub mod internal { pub(crate) fn setup_system() { diff --git a/crates/bevy_internal/Cargo.toml b/crates/bevy_internal/Cargo.toml index a51d1a7ff0737..a9bedc8658ac3 100644 --- a/crates/bevy_internal/Cargo.toml +++ b/crates/bevy_internal/Cargo.toml @@ -71,6 +71,9 @@ bevy_ci_testing = ["bevy_app/bevy_ci_testing", "bevy_render/ci_limits"] # Enable animation support, and glTF animation loading animation = ["bevy_animation", "bevy_gltf?/bevy_animation"] +# Used to disable code that is unsupported when Bevy is dynamically linked +dynamic = ["bevy_diagnostic/dynamic"] + [dependencies] # bevy bevy_app = { path = "../bevy_app", version = "0.9.0" }