mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
Extract target triple and linking logic
This commit is contained in:
parent
a108544fa8
commit
26dfa01205
7 changed files with 282 additions and 203 deletions
|
@ -1,14 +1,23 @@
|
|||
use roc_cli::{build, build_app, repl, DIRECTORY_OR_FILES};
|
||||
use std::io;
|
||||
use std::path::Path;
|
||||
use target_lexicon::Triple;
|
||||
|
||||
fn main() -> io::Result<()> {
|
||||
let matches = build_app().get_matches();
|
||||
|
||||
match matches.subcommand_name() {
|
||||
None => roc_editor::launch(&[]),
|
||||
Some("build") => build(matches.subcommand_matches("build").unwrap(), false),
|
||||
Some("run") => build(matches.subcommand_matches("run").unwrap(), true),
|
||||
Some("build") => build(
|
||||
&Triple::host(),
|
||||
matches.subcommand_matches("build").unwrap(),
|
||||
false,
|
||||
),
|
||||
Some("run") => build(
|
||||
&Triple::host(),
|
||||
matches.subcommand_matches("run").unwrap(),
|
||||
true,
|
||||
),
|
||||
Some("repl") => repl::main(),
|
||||
Some("edit") => {
|
||||
match matches
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue