deal with system target

This commit is contained in:
Brendan Hansknecht 2023-11-05 13:15:22 -08:00
parent 6006891889
commit 2a385839fe
No known key found for this signature in database
GPG Key ID: 0EA784685083E75B

View File

@ -15,7 +15,7 @@ use roc_gen_dev::AssemblyBackendMode;
use roc_gen_llvm::llvm::build::LlvmBackendMode;
use roc_load::{FunctionKind, LoadingProblem, Threading};
use roc_packaging::cache::{self, RocCacheDir};
use roc_target::Target;
use roc_target::{get_target_triple_str, Target};
use std::fs::{self, FileType};
use std::io::{self, Read, Write};
use std::path::{Path, PathBuf};
@ -156,7 +156,10 @@ fn main() -> io::Result<()> {
roc_linker::preprocess_host(
&triple,
&platform_path.with_file_name("main.roc"),
&platform_path.with_file_name(format!("{}.rh", target)),
// The target triple string must be derived from the triple to convert from the generic
// `system` target to the exact specific target.
&platform_path
.with_file_name(format!("{}.rh", get_target_triple_str(&triple).unwrap())),
&stub_lib,
&stub_dll_symbols,
);