fix compilation on non-linux systems

This commit is contained in:
Folkert 2022-12-30 01:24:30 +01:00
parent 9500b0b97b
commit 407fef0602
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
3 changed files with 18 additions and 1 deletions

View file

@ -6,6 +6,19 @@ use cli_utils::helpers::{extract_valgrind_errors, ValgrindError, ValgrindErrorXW
use roc_cli::build::BuiltFile;
fn valgrind_test(source: &str) {
#[cfg(target_os = "linux")]
{
valgrind_test_linux(source)
}
#[cfg(not(target_os = "linux"))]
{
let _ = source;
}
}
#[cfg(target_os = "linux")]
fn valgrind_test_linux(source: &str) {
let pf = std::env::current_dir()
.unwrap()
.join("zig-platform/main.roc");