mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Merge branch 'main' of github.com:roc-lang/roc into rust-1-77-2-upgrade
This commit is contained in:
commit
fb7fa99b2c
631 changed files with 21948 additions and 16419 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)
|
||||
|
@ -1132,6 +1139,8 @@ fn link_macos(
|
|||
// "-lgcc", // TODO will eventually need compiler_rt from gcc or something - see https://github.com/roc-lang/roc/pull/554#discussion_r496370840
|
||||
"-framework",
|
||||
"Security",
|
||||
"-framework",
|
||||
"SystemConfiguration",
|
||||
// Output
|
||||
"-o",
|
||||
output_path.to_str().unwrap(), // app
|
||||
|
|
|
@ -735,9 +735,14 @@ pub fn build_file<'a>(
|
|||
let compilation_start = Instant::now();
|
||||
|
||||
// Step 1: compile the app and generate the .o file
|
||||
let loaded =
|
||||
roc_load::load_and_monomorphize(arena, app_module_path.clone(), roc_cache_dir, load_config)
|
||||
.map_err(|e| BuildFileError::from_mono_error(e, compilation_start))?;
|
||||
let loaded = roc_load::load_and_monomorphize(
|
||||
arena,
|
||||
app_module_path.clone(),
|
||||
None,
|
||||
roc_cache_dir,
|
||||
load_config,
|
||||
)
|
||||
.map_err(|e| BuildFileError::from_mono_error(e, compilation_start))?;
|
||||
|
||||
build_loaded_file(
|
||||
arena,
|
||||
|
@ -1187,6 +1192,7 @@ fn build_and_preprocess_host_lowlevel(
|
|||
pub fn check_file<'a>(
|
||||
arena: &'a Bump,
|
||||
roc_file_path: PathBuf,
|
||||
opt_main_path: Option<PathBuf>,
|
||||
emit_timings: bool,
|
||||
roc_cache_dir: RocCacheDir<'_>,
|
||||
threading: Threading,
|
||||
|
@ -1209,8 +1215,13 @@ pub fn check_file<'a>(
|
|||
threading,
|
||||
exec_mode: ExecutionMode::Check,
|
||||
};
|
||||
let mut loaded =
|
||||
roc_load::load_and_typecheck(arena, roc_file_path, roc_cache_dir, load_config)?;
|
||||
let mut loaded = roc_load::load_and_typecheck(
|
||||
arena,
|
||||
roc_file_path,
|
||||
opt_main_path,
|
||||
roc_cache_dir,
|
||||
load_config,
|
||||
)?;
|
||||
|
||||
let buf = &mut String::with_capacity(1024);
|
||||
|
||||
|
@ -1292,6 +1303,7 @@ pub fn build_str_test<'a>(
|
|||
PathBuf::from("valgrind_test.roc"),
|
||||
app_module_source,
|
||||
app_module_path.to_path_buf(),
|
||||
None,
|
||||
roc_cache_dir,
|
||||
load_config,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue