We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c29a783 commit 1d9dc86Copy full SHA for 1d9dc86
tests/functions.rs
@@ -14,14 +14,17 @@ fn make_helpers() {
14
cmd
15
.arg("src/test_helpers.rs")
16
.arg("-o")
17
- .arg(LIBPATH)
18
- // .arg("--target")
19
- // .arg(env!("LIBLOADING_TEST_TARGET"))
20
- .arg("-O");
21
-
22
- cmd
23
- .output()
24
- .expect("could not compile the test helpers!");
+ .arg(LIBPATH);
+ if let Some(target) = std::env::var_os("TARGET") {
+ cmd.arg("--target").arg(target);
+ } else {
+ eprintln!("WARNING: $TARGET NOT SPECIFIED! BUILDING HELPER MODULE FOR NATIVE TARGET.");
+ }
+ assert!(cmd
+ .status()
25
+ .expect("could not compile the test helpers!")
26
+ .success()
27
+ );
28
});
29
}
30
0 commit comments