ed63be5dab
## Summary * Updates existing references to use EnvVars where usage was missing. * Adds missing entries to env var usages, e.g. new env var declarations in uv-trampoline, tests, etc. * Note: this doesn't affect trampoline sizes as the end result is the same * Fixes versioning of `UV_HIDE_BUILD_OUTPUT`. ## Test Plan Existing Tests. Compiled the trampolines locally to verify zero changes (size, binary). ## Question Will this complicate the crates publishing release process? I'm not certain yet if it will be an issue for uv-trampoline (non-workspace member) to reference a uv workspace member from a bump & release perspective wrt lock files. If so, I'll revert the uv-trampoline changes but keep the others.
18 lines
767 B
Rust
18 lines
767 B
Rust
// This embeds a "manifest" - a special XML document - into our built binary.
|
|
// The main things it does is tell Windows that we want to use the magic
|
|
// utf8 codepage, so we can use the *A versions of Windows API functions and
|
|
// don't have to mess with utf-16.
|
|
use embed_manifest::{embed_manifest, new_manifest};
|
|
|
|
use uv_static::EnvVars;
|
|
|
|
fn main() {
|
|
if std::env::var_os(EnvVars::CARGO_CFG_WINDOWS).is_some() {
|
|
let manifest =
|
|
new_manifest("uv.Trampoline").remove_dependency("Microsoft.Windows.Common-Controls");
|
|
embed_manifest(manifest).expect("unable to embed manifest");
|
|
println!("cargo::rustc-link-lib=ucrt"); // https://github.com/rust-lang/rust/issues/143172
|
|
println!("cargo:rerun-if-changed=build.rs");
|
|
}
|
|
}
|