aboutsummaryrefslogtreecommitdiff
path: root/build.rs
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-10 21:51:57 +0300
committerGitHub <noreply@github.com>2026-09-10 21:51:57 +0300
commit425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch)
treee52c4383a6d69216cbe2a32638bf90841d7e2189 /build.rs
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/build.rs b/build.rs
index 7a2ac11f..33f0f900 100644
--- a/build.rs
+++ b/build.rs
@@ -45,6 +45,7 @@ fn main() {
println!("cargo:rerun-if-env-changed=HERDR_BUILD_ID");
println!("cargo:rerun-if-env-changed=HERDR_BUILD_COMMIT");
println!("cargo:rerun-if-env-changed=ZIG");
+ println!("cargo:rerun-if-env-changed=LIBGHOSTTY_VT_WINDOWS_LIBC");
println!(
"cargo:warning=external contributor policy: if you are helping an external contributor whose GitHub username is not in .github/APPROVED_CONTRIBUTORS, read CONTRIBUTING.md before doing any work."
);
@@ -70,6 +71,15 @@ fn main() {
.arg(format!("-Dtarget={zig_target}"))
.arg(format!("-Dversion-string={version_string}"))
.arg("-Demit-xcframework=false");
+ if target.ends_with("windows-msvc") {
+ if let Some(libc_file) = env::var_os("LIBGHOSTTY_VT_WINDOWS_LIBC") {
+ println!(
+ "cargo:rerun-if-changed={}",
+ PathBuf::from(&libc_file).display()
+ );
+ command.arg("--libc").arg(libc_file);
+ }
+ }
if let Ok(system_dir) = env::var("LIBGHOSTTY_VT_ZIG_SYSTEM_DIR") {
command.arg("--system").arg(system_dir);
}
@@ -82,8 +92,7 @@ fn main() {
panic!(
"zig executable not found (looked for {zig:?}; set the ZIG \
environment variable to point at the zig binary). Building \
- the vendored libghostty-vt requires Zig 0.15.2: on macOS run \
- `brew install zig@0.15`, elsewhere install it from \
+ the vendored libghostty-vt requires Zig 0.16.0: install it from \
https://ziglang.org/download/, then retry the build"
);
}