zed/crates/ztracing/build.rs
Jakub Konka 7ce845210d
ztracing: Enable memory profiling and callstack sampling (#47052)
While at it, annotate more functions that are potentially related to
language parsing in buffers.

Also, on macOS, in order to actually have callstack frames properly
recorded by Tracy, you need to manually run `dsymutil` on the binary.

Release Notes:

- N/A
2026-01-17 19:29:19 +00:00

14 lines
462 B
Rust

use std::env;
fn main() {
if env::var_os("ZTRACING").is_some() {
println!("cargo::rustc-cfg=ztracing");
}
if env::var_os("ZTRACING_WITH_MEMORY").is_some() {
println!("cargo::rustc-cfg=ztracing");
println!("cargo::rustc-cfg=ztracing_with_memory");
}
println!("cargo::rerun-if-changed=build.rs");
println!("cargo::rerun-if-env-changed=ZTRACING");
println!("cargo::rerun-if-env-changed=ZTRACING_WITH_MEMORY");
}