fixes to make default.nix work

This commit is contained in:
Anton-4 2022-08-01 16:50:38 +02:00
parent 11fd062a86
commit 43f9e2a7c3
No known key found for this signature in database
GPG key ID: A13F4A6E21141925
11 changed files with 100 additions and 69 deletions

View file

@ -1,16 +1,29 @@
use roc_module::symbol::Symbol;
use roc_target::TargetInfo;
use roc_utils::get_lib_path;
use std::ops::Index;
pub const BUILTINS_HOST_OBJ_PATH: &str = env!(
"BUILTINS_HOST_O",
"Env var BUILTINS_HOST_O not found. Is there a problem with the build script?"
);
pub fn get_builtins_host_obj_path() -> String {
let builtins_host_path = get_lib_path()
.expect("Failed to find lib dir.")
.join("builtins-host.o");
pub const BUILTINS_WASM32_OBJ_PATH: &str = env!(
"BUILTINS_WASM32_O",
"Env var BUILTINS_WASM32_O not found. Is there a problem with the build script?"
);
builtins_host_path
.into_os_string()
.into_string()
.expect("Failed to convert builtins_host_path to str")
}
pub fn get_builtins_wasm32_obj_path() -> String {
let builtins_wasm32_path = get_lib_path()
.expect("Failed to find lib dir.")
.join("builtins-wasm32.o");
builtins_wasm32_path
.into_os_string()
.into_string()
.expect("Failed to convert builtins_wasm32_path to str")
}
#[derive(Debug, Default, Copy, Clone)]
pub struct IntrinsicName {