Fix link order: use rustc-link-arg for proper library placement
- SHA
5001b864ef5adcb5f08dc8ef93f6e1a25df57885- Parents
-
09ef15f - Tree
d433671
5001b86
5001b864ef5adcb5f08dc8ef93f6e1a25df5788509ef15f
d433671| Status | File | + | - |
|---|---|---|---|
| M |
Cargo.toml
|
1 | 1 |
| M |
build.rs
|
4 | 4 |
Cargo.tomlmodified@@ -1,6 +1,6 @@ | ||
| 1 | 1 | [package] |
| 2 | 2 | name = "fussr" |
| 3 | -version = "0.2.11" | |
| 3 | +version = "0.2.12" | |
| 4 | 4 | edition = "2021" |
| 5 | 5 | description = "A git staging TUI tool - Rust port of fuss" |
| 6 | 6 | authors = ["Matthew Wolffe"] |
build.rsmodified@@ -1,7 +1,7 @@ | ||
| 1 | 1 | fn main() { |
| 2 | 2 | // Explicitly link against libgit2 and libssh2 |
| 3 | - // This works around issues where the -sys crates' build.rs output | |
| 4 | - // isn't being properly processed by cargo | |
| 5 | - println!("cargo:rustc-link-lib=git2"); | |
| 6 | - println!("cargo:rustc-link-lib=ssh2"); | |
| 3 | + // Use link-arg to append to the END of the linker command line | |
| 4 | + // This ensures the libraries come AFTER the Rust code that needs them | |
| 5 | + println!("cargo:rustc-link-arg=-lgit2"); | |
| 6 | + println!("cargo:rustc-link-arg=-lssh2"); | |
| 7 | 7 | } |