Skip to content

[Merged by Bors] - Fix dynamic linking (on linux) #7333

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
3 changes: 3 additions & 0 deletions crates/bevy_diagnostic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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() {
Expand Down
3 changes: 3 additions & 0 deletions crates/bevy_internal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down