mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
fix compilation on non-linux systems
This commit is contained in:
parent
9500b0b97b
commit
407fef0602
3 changed files with 18 additions and 1 deletions
|
@ -133,7 +133,7 @@ pub fn build_file<'a>(
|
|||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn build_loaded_file<'a>(
|
||||
fn build_loaded_file<'a>(
|
||||
arena: &'a Bump,
|
||||
target: &Triple,
|
||||
app_module_path: PathBuf,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#[cfg(target_os = "linux")]
|
||||
fn main() {
|
||||
let temp_dir = tempfile::tempdir().unwrap();
|
||||
let app_module_path = temp_dir.path().join("app.roc");
|
||||
|
@ -31,3 +32,6 @@ fn main() {
|
|||
|
||||
res_binary_path.unwrap();
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
fn main() {}
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue