diff options
Diffstat (limited to 'build.rs')
| -rw-r--r-- | build.rs | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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" ); } |
