diff options
author | Andrzej Janik <[email protected]> | 2021-01-16 22:28:48 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-16 22:28:48 +0100 |
commit | ff8135e8a308e8e3e155e6873989423ccad7a27a (patch) | |
tree | 7b34d0d7b8944c28fd1c3ecbff1af7ca5ef6767b /detours-sys | |
parent | 09f679693bec135776380c92409f4693587ff482 (diff) | |
download | ZLUDA-ff8135e8a308e8e3e155e6873989423ccad7a27a.tar.gz ZLUDA-ff8135e8a308e8e3e155e6873989423ccad7a27a.zip |
Add a library for dumping kernels arguments before and after launch (#18)
Diffstat (limited to 'detours-sys')
-rw-r--r-- | detours-sys/build.rs | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/detours-sys/build.rs b/detours-sys/build.rs index f3da0e6..20bb342 100644 --- a/detours-sys/build.rs +++ b/detours-sys/build.rs @@ -1,10 +1,8 @@ -use std::error::Error; - #[cfg(not(target_os = "windows"))] fn main() {} #[cfg(target_os = "windows")] -fn main() -> Result<(), Box<dyn Error>> { +fn main() -> Result<(), Box<dyn std::error::Error>> { windows::main_impl() } @@ -37,18 +35,15 @@ mod windows { .try_compile("detours")?; Ok(()) } - - #[cfg(target_env = "msvc")] - fn add_target_options(build: &mut cc::Build) -> &mut cc::Build { - build - } - - #[cfg(not(target_env = "msvc"))] fn add_target_options(build: &mut cc::Build) -> &mut cc::Build { - build - .compiler("clang") - .cpp(true) - .flag("-fms-extensions") - .flag("-Wno-everything") + if std::env::var("CARGO_CFG_TARGET_ENV").unwrap() != "msvc" { + build + .compiler("clang") + .cpp(true) + .flag("-fms-extensions") + .flag("-Wno-everything") + } else { + build + } } } |