mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
default to host libhost
for prebuilt platform binary if target specific not found
This commit is contained in:
parent
7e1a82f048
commit
3a2b27dcdb
1 changed files with 7 additions and 0 deletions
|
@ -50,8 +50,15 @@ pub fn legacy_host_file(target: Target, platform_main_roc: &Path) -> PathBuf {
|
|||
.replace(roc_linker::PRECOMPILED_HOST_EXT, lib_ext);
|
||||
|
||||
let lib_path = platform_main_roc.with_file_name(file_name);
|
||||
|
||||
let default_host_path: PathBuf = platform_main_roc
|
||||
.with_file_name("libhost")
|
||||
.with_extension(lib_ext);
|
||||
|
||||
if lib_path.exists() {
|
||||
lib_path
|
||||
} else if default_host_path.exists() {
|
||||
default_host_path
|
||||
} else {
|
||||
let obj_ext = target.object_file_ext();
|
||||
lib_path.with_extension(obj_ext)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue