Skip to content

Commit

Permalink
Merge pull request #6762 from roc-lang/default-prebuilt-host
Browse files Browse the repository at this point in the history
Look for a generic default host `libhost` for prebuilt platform binary
  • Loading branch information
Anton-4 committed May 20, 2024
2 parents 7e1a82f + 3a2b27d commit 45a7e44
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/compiler/build/src/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 45a7e44

Please sign in to comment.