mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Merge pull request #3887 from roc-lang/lib-dir-erro
improved lib dir error msg
This commit is contained in:
commit
f5e1baffda
1 changed files with 4 additions and 4 deletions
|
@ -3,10 +3,10 @@ use roc_target::TargetInfo;
|
||||||
use roc_utils::get_lib_path;
|
use roc_utils::get_lib_path;
|
||||||
use std::ops::Index;
|
use std::ops::Index;
|
||||||
|
|
||||||
|
const LIB_DIR_ERROR: &str = "Failed to find the lib directory. Did you copy the roc binary without also copying the lib directory?\nIf you built roc from source, the lib dir should be in target/release.\nIf not, the lib dir should be included in the release tar.gz file.";
|
||||||
|
|
||||||
pub fn get_builtins_host_obj_path() -> String {
|
pub fn get_builtins_host_obj_path() -> String {
|
||||||
let builtins_host_path = get_lib_path()
|
let builtins_host_path = get_lib_path().expect(LIB_DIR_ERROR).join("builtins-host.o");
|
||||||
.expect("Failed to find lib dir.")
|
|
||||||
.join("builtins-host.o");
|
|
||||||
|
|
||||||
builtins_host_path
|
builtins_host_path
|
||||||
.into_os_string()
|
.into_os_string()
|
||||||
|
@ -16,7 +16,7 @@ pub fn get_builtins_host_obj_path() -> String {
|
||||||
|
|
||||||
pub fn get_builtins_wasm32_obj_path() -> String {
|
pub fn get_builtins_wasm32_obj_path() -> String {
|
||||||
let builtins_wasm32_path = get_lib_path()
|
let builtins_wasm32_path = get_lib_path()
|
||||||
.expect("Failed to find lib dir.")
|
.expect(LIB_DIR_ERROR)
|
||||||
.join("builtins-wasm32.o");
|
.join("builtins-wasm32.o");
|
||||||
|
|
||||||
builtins_wasm32_path
|
builtins_wasm32_path
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue