diff options
Diffstat (limited to 'zluda_inject')
-rw-r--r-- | zluda_inject/Cargo.toml | 2 | ||||
-rw-r--r-- | zluda_inject/build.rs | 3 | ||||
-rw-r--r-- | zluda_inject/tests/helpers/do_cuinit_early.rs | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/zluda_inject/Cargo.toml b/zluda_inject/Cargo.toml index 65113a4..20e2e2d 100644 --- a/zluda_inject/Cargo.toml +++ b/zluda_inject/Cargo.toml @@ -9,7 +9,7 @@ name = "zluda_with" path = "src/main.rs" [target.'cfg(windows)'.dependencies] -winapi = { version = "0.3", features = ["jobapi2", "processthreadsapi", "synchapi", "winbase", "std"] } +winapi = { version = "0.3", features = ["jobapi2", "processthreadsapi", "synchapi", "winbase", "std", "processenv"] } tempfile = "3" argh = "0.1" detours-sys = { path = "../detours-sys" } diff --git a/zluda_inject/build.rs b/zluda_inject/build.rs index ccce573..c79d2d2 100644 --- a/zluda_inject/build.rs +++ b/zluda_inject/build.rs @@ -7,6 +7,9 @@ use std::{ };
fn main() -> Result<(), VarError> {
+ if std::env::var_os("CARGO_CFG_WINDOWS").is_none() {
+ return Ok(());
+ }
println!("cargo:rerun-if-changed=build.rs");
if env::var("PROFILE")? != "debug" {
return Ok(());
diff --git a/zluda_inject/tests/helpers/do_cuinit_early.rs b/zluda_inject/tests/helpers/do_cuinit_early.rs index 9743f4a..7d10855 100644 --- a/zluda_inject/tests/helpers/do_cuinit_early.rs +++ b/zluda_inject/tests/helpers/do_cuinit_early.rs @@ -1,6 +1,6 @@ #![crate_type = "bin"]
-#[link(name = "do_cuinit")]
+#[link(name = "do_cuinit", kind = "raw-dylib")]
extern "system" {
fn do_cuinit(flags: u32) -> u32;
}
|