diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-04-05 17:19:27 +0300 |
|---|---|---|
| committer | Can Celik <ogulcancelik@gmail.com> | 2026-04-05 17:19:27 +0300 |
| commit | b33f076971ea5cb86720fa2525b5d6839fef0fa7 (patch) | |
| tree | 4a4f17441031f8ed3abea9a3092b6c894e44e1b3 | |
| parent | 8fd1bc56cec7a8a45198518184ae80521e969e32 (diff) | |
build: statically link vendored libghostty-vt on macos
| -rw-r--r-- | build.rs | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -43,10 +43,14 @@ fn main() { let lib_dir = vendored_dir.join("zig-out/lib"); println!("cargo:rustc-link-search=native={}", lib_dir.display()); - println!("cargo:rustc-link-lib=static=ghostty-vt"); - if target.contains("linux") { - println!("cargo:rustc-link-lib=dylib=stdc++"); - } else if target.contains("apple-darwin") { + if target.contains("apple-darwin") { + let static_lib = lib_dir.join("libghostty-vt.a"); + println!("cargo:rustc-link-arg={}", static_lib.display()); println!("cargo:rustc-link-lib=dylib=c++"); + } else { + println!("cargo:rustc-link-lib=static=ghostty-vt"); + if target.contains("linux") { + println!("cargo:rustc-link-lib=dylib=stdc++"); + } } } |
