Add base of loading cloning exec for surgery

This commit is contained in:
Brendan Hansknecht 2021-08-21 14:55:39 -07:00
parent b84d958a9a
commit b0c3aa3d1c
2 changed files with 341 additions and 34 deletions

View file

@ -1,4 +1,4 @@
use roc_linker::{build_app, preprocess, CMD_PREPROCESS, CMD_SURGERY};
use roc_linker::{build_app, preprocess, surgery, CMD_PREPROCESS, CMD_SURGERY};
use std::io;
fn main() -> io::Result<()> {
@ -10,7 +10,10 @@ fn main() -> io::Result<()> {
let sub_matches = matches.subcommand_matches(CMD_PREPROCESS).unwrap();
preprocess(sub_matches)
}
Some(CMD_SURGERY) => Ok(0),
Some(CMD_SURGERY) => {
let sub_matches = matches.subcommand_matches(CMD_SURGERY).unwrap();
surgery(sub_matches)
}
_ => unreachable!(),
}?;
std::process::exit(exit_code);