mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Fix dynamic linking (on linux) (#7333)
# Problemo Some code in #5911 and #5454 does not compile with dynamic linking enabled. The code is behind a feature gate to prevent dynamically linked builds from breaking, but it's not quite set up correctly. ## Solution Forward the `dynamic` feature flag to the `bevy_diagnostic` crate and gate the code behind it. Co-authored-by: devil-ira <justthecooldude@gmail.com>
This commit is contained in:
parent
5f18033dd3
commit
38691ee95c
4 changed files with 9 additions and 3 deletions
|
@ -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"]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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" }
|
||||
|
|
Loading…
Reference in a new issue