mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
Allow --precompiled-host=false
This commit is contained in:
parent
6b213be997
commit
1f93973dbf
1 changed files with 13 additions and 5 deletions
|
@ -126,7 +126,9 @@ pub fn build_app<'a>() -> App<'a> {
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new(FLAG_PRECOMPILED)
|
Arg::new(FLAG_PRECOMPILED)
|
||||||
.long(FLAG_PRECOMPILED)
|
.long(FLAG_PRECOMPILED)
|
||||||
.about("Assumes the host has been precompiled and skips recompiling the host.")
|
.about("Assumes the host has been precompiled and skips recompiling the host. (Enabled by default when using a --target other than `--target host`)")
|
||||||
|
.possible_values(["true", "false"])
|
||||||
|
.default_value("true")
|
||||||
.required(false),
|
.required(false),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
|
@ -230,7 +232,9 @@ pub fn build_app<'a>() -> App<'a> {
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new(FLAG_PRECOMPILED)
|
Arg::new(FLAG_PRECOMPILED)
|
||||||
.long(FLAG_PRECOMPILED)
|
.long(FLAG_PRECOMPILED)
|
||||||
.about("Assumes the host has been precompiled and skips recompiling the host. (Enabled by default when using --target other than --target host)")
|
.about("Assumes the host has been precompiled and skips recompiling the host. (Enabled by default when using a --target other than `--target host`)")
|
||||||
|
.possible_values(["true", "false"])
|
||||||
|
.default_value("true")
|
||||||
.required(false),
|
.required(false),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
|
@ -338,9 +342,13 @@ pub fn build(matches: &ArgMatches, config: BuildConfig) -> io::Result<i32> {
|
||||||
roc_linker::supported(&link_type, &triple)
|
roc_linker::supported(&link_type, &triple)
|
||||||
};
|
};
|
||||||
|
|
||||||
// When compiling for a different target, we assume a precompiled host.
|
let precompiled = if matches.is_present(FLAG_PRECOMPILED) {
|
||||||
// Otherwise compilation would most likely fail!
|
matches.value_of(FLAG_PRECOMPILED) == Some("true")
|
||||||
let precompiled = target != Target::Host || matches.is_present(FLAG_PRECOMPILED);
|
} else {
|
||||||
|
// When compiling for a different target, default to assuming a precompiled host.
|
||||||
|
// Otherwise compilation would most likely fail!
|
||||||
|
target != Target::Host
|
||||||
|
};
|
||||||
let path = Path::new(filename);
|
let path = Path::new(filename);
|
||||||
|
|
||||||
// Spawn the root task
|
// Spawn the root task
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue