Skip to content

Commit

Permalink
Restore the cargo:rustc-cdylib-link-arg
Browse files Browse the repository at this point in the history
Not having it causes link error when building on macOs

The CI don't catch that because we define the DYLD_FRAMEWORK_PATH env
variable
  • Loading branch information
ogoffart committed Nov 3, 2023
1 parent c5aa4e8 commit 855840e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

## 0.2.11 2023-11-03 (qttype only)

- reenable `cargo:rustc-cdylib-link-arg=-Wl,-rpath,` command even if it is depracated as it broke people's build

## 0.2.10 2023-11-03

- qttypes: detect MSVC and MinGW incompatibilities
Expand Down
2 changes: 1 addition & 1 deletion qttypes/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "qttypes"
version = "0.2.10"
version = "0.2.11"
edition = "2018"
authors = ["Olivier Goffart <olivier.goffart@slint.dev>"]
build = "build.rs"
Expand Down
3 changes: 1 addition & 2 deletions qttypes/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,9 @@ fn main() {
report_error(&format!("Rust target '{}' is not compatible with Qt mkspec '{spec}'. Mixing MinGW and MSVC is not allowed.", std::env::var_os("TARGET").unwrap_or_default().to_string_lossy()));
}
}
/* https://github.com/rust-lang/cargo/issues/9562
if std::env::var("CARGO_CFG_TARGET_FAMILY").as_ref().map(|s| s.as_ref()) == Ok("unix") {
println!("cargo:rustc-cdylib-link-arg=-Wl,-rpath,{}", &qt_library_path);
} */
}

println!("cargo:rustc-link-search{}={}", macos_lib_search, &qt_library_path);

Expand Down

0 comments on commit 855840e

Please sign in to comment.