Use roc_target over target_lexicon

Tailors a target class for our needs.
Replaces tons of uses across the entire compiler.
This is a base for later adding new targets like thumb.
This commit is contained in:
Brendan Hansknecht 2024-03-21 21:54:58 -07:00
parent 185262510c
commit 6dc5bfb1b7
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
72 changed files with 1008 additions and 1371 deletions

View file

@ -6,7 +6,7 @@ use roc_collections::all::MutMap;
use roc_module::symbol::ModuleId;
use roc_packaging::cache::RocCacheDir;
use roc_reporting::report::{Palette, RenderTarget};
use roc_target::TargetInfo;
use roc_target::Target;
use std::path::PathBuf;
const SKIP_SUBS_CACHE: bool = {
@ -51,7 +51,7 @@ fn load<'a>(
pub fn load_single_threaded<'a>(
arena: &'a Bump,
load_start: LoadStart<'a>,
target_info: TargetInfo,
target: Target,
function_kind: FunctionKind,
render: RenderTarget,
palette: Palette,
@ -65,7 +65,7 @@ pub fn load_single_threaded<'a>(
arena,
load_start,
exposed_types,
target_info,
target,
function_kind,
cached_subs,
render,
@ -172,7 +172,7 @@ pub fn load_and_typecheck_str<'a>(
filename: PathBuf,
source: &'a str,
src_dir: PathBuf,
target_info: TargetInfo,
target: Target,
function_kind: FunctionKind,
render: RenderTarget,
roc_cache_dir: RocCacheDir<'_>,
@ -188,7 +188,7 @@ pub fn load_and_typecheck_str<'a>(
match load_single_threaded(
arena,
load_start,
target_info,
target,
function_kind,
render,
palette,