cli: add --verbose flag to CMD_BUILD

This commit is contained in:
Jakub Konka 2024-12-30 22:52:07 +01:00
parent 3b3f79a5d2
commit 4764b23282
No known key found for this signature in database
GPG key ID: 3AEF55DD984C8344
4 changed files with 24 additions and 1 deletions

View file

@ -725,6 +725,7 @@ pub fn build_file<'a>(
roc_cache_dir: RocCacheDir<'_>,
load_config: LoadConfig,
out_path: Option<&Path>,
verbose: bool,
) -> Result<BuiltFile<'a>, BuildFileError<'a>> {
let compilation_start = Instant::now();
@ -751,6 +752,7 @@ pub fn build_file<'a>(
loaded,
compilation_start,
out_path,
verbose,
)
}
@ -827,6 +829,7 @@ fn build_loaded_file<'a>(
loaded: roc_load::MonomorphizedModule<'a>,
compilation_start: Instant,
out_path: Option<&Path>,
verbose: bool,
) -> Result<BuiltFile<'a>, BuildFileError<'a>> {
// get the platform path from the app header
let platform_main_roc_path = match &loaded.entry_point {
@ -956,6 +959,7 @@ fn build_loaded_file<'a>(
&roc_app_bytes,
&output_exe_path,
metadata_file,
verbose,
);
}
(LinkingStrategy::Additive, _) | (LinkingStrategy::Legacy, LinkType::None) => {
@ -1475,6 +1479,7 @@ pub fn build_str_test<'a>(
loaded,
compilation_start,
None,
false,
)
}