mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
make things compile
This commit is contained in:
parent
08a3f0fb9a
commit
f1ec5c30d0
4 changed files with 7 additions and 6 deletions
|
@ -3,6 +3,7 @@ use roc_build::{
|
||||||
link::{link, rebuild_host, LinkType},
|
link::{link, rebuild_host, LinkType},
|
||||||
program,
|
program,
|
||||||
};
|
};
|
||||||
|
#[cfg(feature = "llvm")]
|
||||||
use roc_builtins::bitcode;
|
use roc_builtins::bitcode;
|
||||||
use roc_can::builtins::builtin_defs_map;
|
use roc_can::builtins::builtin_defs_map;
|
||||||
use roc_collections::all::MutMap;
|
use roc_collections::all::MutMap;
|
||||||
|
@ -11,6 +12,7 @@ use roc_mono::ir::OptLevel;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::time::{Duration, SystemTime};
|
use std::time::{Duration, SystemTime};
|
||||||
use target_lexicon::Triple;
|
use target_lexicon::Triple;
|
||||||
|
#[cfg(feature = "llvm")]
|
||||||
use tempfile::Builder;
|
use tempfile::Builder;
|
||||||
|
|
||||||
fn report_timing(buf: &mut String, label: &str, duration: Duration) {
|
fn report_timing(buf: &mut String, label: &str, duration: Duration) {
|
||||||
|
|
|
@ -11,12 +11,13 @@ use std::path::{Path, PathBuf};
|
||||||
#[global_allocator]
|
#[global_allocator]
|
||||||
static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||||
|
|
||||||
#[cfg(feature = "llvm")]
|
|
||||||
use roc_cli::build;
|
|
||||||
use std::ffi::{OsStr, OsString};
|
use std::ffi::{OsStr, OsString};
|
||||||
|
|
||||||
|
#[cfg(feature = "llvm")]
|
||||||
|
use roc_cli::build;
|
||||||
|
|
||||||
#[cfg(not(feature = "llvm"))]
|
#[cfg(not(feature = "llvm"))]
|
||||||
fn build(_target: &Triple, _matches: &clap::ArgMatches, _config: BuildConfig) -> io::Result<i32> {
|
fn build(_matches: &clap::ArgMatches, _config: BuildConfig) -> io::Result<i32> {
|
||||||
panic!("Building without LLVM is not currently supported.");
|
panic!("Building without LLVM is not currently supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ use crate::target::arch_str;
|
||||||
#[cfg(feature = "llvm")]
|
#[cfg(feature = "llvm")]
|
||||||
use libloading::{Error, Library};
|
use libloading::{Error, Library};
|
||||||
use roc_builtins::bitcode;
|
use roc_builtins::bitcode;
|
||||||
#[cfg(feature = "llvm")]
|
// #[cfg(feature = "llvm")]
|
||||||
use roc_mono::ir::OptLevel;
|
use roc_mono::ir::OptLevel;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
|
@ -2,11 +2,9 @@
|
||||||
use roc_gen_llvm::llvm::build::module_from_builtins;
|
use roc_gen_llvm::llvm::build::module_from_builtins;
|
||||||
#[cfg(feature = "llvm")]
|
#[cfg(feature = "llvm")]
|
||||||
pub use roc_gen_llvm::llvm::build::FunctionIterator;
|
pub use roc_gen_llvm::llvm::build::FunctionIterator;
|
||||||
#[cfg(feature = "llvm")]
|
|
||||||
use roc_load::file::MonomorphizedModule;
|
use roc_load::file::MonomorphizedModule;
|
||||||
#[cfg(feature = "llvm")]
|
#[cfg(feature = "llvm")]
|
||||||
use roc_mono::ir::OptLevel;
|
use roc_mono::ir::OptLevel;
|
||||||
#[cfg(feature = "llvm")]
|
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue