Fix being run from rust-analyzer with a clean environment

Detect that we're being run from rust-analyzer and don't link to C++
libraries in that case.

Fixes #6019.
This commit is contained in:
heinrich5991 2022-11-09 15:09:42 +01:00
parent 26a186287e
commit 80d72cf157

View file

@ -19,7 +19,8 @@ fn main() {
println!("cargo:rerun-if-env-changed=DDNET_TEST_LIBRARIES");
println!("cargo:rerun-if-env-changed=DDNET_TEST_NO_LINK");
if env::var_os("DDNET_TEST_NO_LINK").is_some() {
println!("cargo:rerun-if-env-changed=RA_RUSTC_WRAPPER");
if env::var_os("DDNET_TEST_NO_LINK").is_some() || env::var_os("RA_RUSTC_WRAPPER").is_some() {
return;
}
if env::var_os("CARGO_FEATURE_LINK_TEST_LIBRARIES").is_some() {