mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
Intentionally leak arena for batch builds
This commit is contained in:
parent
e23d526a4c
commit
65296b9446
1 changed files with 10 additions and 6 deletions
|
@ -175,12 +175,6 @@ pub fn build(target: &Triple, matches: &ArgMatches, config: BuildConfig) -> io::
|
|||
.strip_prefix(env::current_dir().unwrap())
|
||||
.unwrap_or(&binary_path);
|
||||
|
||||
println!(
|
||||
"🎉 Built {} in {} ms",
|
||||
generated_filename.to_str().unwrap(),
|
||||
total_time.as_millis()
|
||||
);
|
||||
|
||||
// Return a nonzero exit code if there were problems
|
||||
let status_code = match outcome {
|
||||
BuildOutcome::NoProblems => 0,
|
||||
|
@ -188,6 +182,16 @@ pub fn build(target: &Triple, matches: &ArgMatches, config: BuildConfig) -> io::
|
|||
BuildOutcome::Errors => 2,
|
||||
};
|
||||
|
||||
// No need to waste time freeing this memory,
|
||||
// since the process is about to exit anyway.
|
||||
std::mem::forget(arena);
|
||||
|
||||
println!(
|
||||
"🎉 Built {} in {} ms",
|
||||
generated_filename.to_str().unwrap(),
|
||||
total_time.as_millis()
|
||||
);
|
||||
|
||||
Ok(status_code)
|
||||
}
|
||||
BuildAndRun { roc_file_arg_index } => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue