Remove the link Cargo feature (#5752)

This commit is contained in:
Mads Marquart 2024-05-30 00:55:33 +02:00 committed by GitHub
parent 588950110a
commit 60a14c67fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 10 additions and 8 deletions

View File

@ -96,6 +96,15 @@ By @stefnotch in [#5410](https://github.com/gfx-rs/wgpu/pull/5410)
- Avoid introducing spurious features for optional dependencies. By @bjorn3 in [#5691](https://github.com/gfx-rs/wgpu/pull/5691)
#### Metal
- Removed the `link` Cargo feature.
This was used to allow weakly linking frameworks. This can be achieved with putting something like the following in your `.cargo/config.toml` instead:
```toml
[target.'cfg(target_vendor = "apple")']
rustflags = ["-C", "link-args=-weak_framework Metal -weak_framework QuartzCore -weak_framework CoreGraphics"]
```
### Bug Fixes
#### General

View File

@ -32,17 +32,12 @@ ignored = ["cfg_aliases"]
[lib]
[features]
default = ["link"]
## Log all API entry points at info instead of trace level.
api_log_info = []
## Log resource lifecycle management at info instead of trace level.
resource_log_info = []
## Use static linking for libraries. Disable to manually link. Enabled by default.
link = ["hal/link"]
## Support the Renderdoc graphics debugger:
## <https://renderdoc.org/>
renderdoc = ["hal/renderdoc"]

View File

@ -37,7 +37,6 @@ ignored = ["cfg_aliases"]
[lib]
[features]
default = ["link"]
metal = ["naga/msl-out", "dep:block"]
vulkan = [
"naga/spv-out",
@ -76,7 +75,6 @@ windows_rs = ["dep:gpu-allocator"]
dxc_shader_compiler = ["dep:hassle-rs"]
renderdoc = ["dep:libloading", "dep:renderdoc-sys"]
fragile-send-sync-non-atomic-wasm = ["wgt/fragile-send-sync-non-atomic-wasm"]
link = ["metal/link"]
# Panic when running into an out-of-memory error (for debugging purposes).
#
# Only affects the d3d12 and vulkan backends.

View File

@ -17,7 +17,7 @@ use objc::{
use parking_lot::{Mutex, RwLock};
#[cfg(target_os = "macos")]
#[cfg_attr(feature = "link", link(name = "QuartzCore", kind = "framework"))]
#[link(name = "QuartzCore", kind = "framework")]
extern "C" {
#[allow(non_upper_case_globals)]
static kCAGravityTopLeft: *mut Object;