1 use lazy_static::lazy_static;
3 use std::path::PathBuf;
6 pub static ref CARGO_TARGET_DIR: PathBuf = {
7 match env::var_os("CARGO_TARGET_DIR") {
9 None => env::current_dir().unwrap().join("target"),
12 pub static ref TARGET_LIB: PathBuf = {
13 if let Some(path) = option_env!("TARGET_LIBS") {
16 let mut dir = CARGO_TARGET_DIR.clone();
17 if let Some(target) = env::var_os("CARGO_BUILD_TARGET") {
20 dir.push(env!("PROFILE"));
27 pub fn is_rustc_test_suite() -> bool {
28 option_env!("RUSTC_TEST_SUITE").is_some()