From 855840e1313251456ead02dc529b2ddf8860b463 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 3 Nov 2023 14:25:40 +0100 Subject: [PATCH] Restore the cargo:rustc-cdylib-link-arg 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 --- CHANGELOG.md | 4 ++++ qttypes/Cargo.toml | 2 +- qttypes/build.rs | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1d4c8d..65a2551 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/qttypes/Cargo.toml b/qttypes/Cargo.toml index 2c85e2a..c70ef0b 100644 --- a/qttypes/Cargo.toml +++ b/qttypes/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "qttypes" -version = "0.2.10" +version = "0.2.11" edition = "2018" authors = ["Olivier Goffart "] build = "build.rs" diff --git a/qttypes/build.rs b/qttypes/build.rs index bee8b6a..1a6e0f6 100644 --- a/qttypes/build.rs +++ b/qttypes/build.rs @@ -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);