mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
Rephrase "precompiled platform" to "prebuilt platform"
This commit is contained in:
parent
50a8cff460
commit
68be131bd7
4 changed files with 22 additions and 22 deletions
|
@ -151,7 +151,7 @@ pub fn build_file<'a>(
|
|||
// TODO this should probably be moved before load_and_monomorphize.
|
||||
// To do this we will need to preprocess files just for their exported symbols.
|
||||
// Also, we should no longer need to do this once we have platforms on
|
||||
// a package repository, as we can then get precompiled platforms from there.
|
||||
// a package repository, as we can then get prebuilt platforms from there.
|
||||
|
||||
let exposed_values = loaded
|
||||
.exposed_to_host
|
||||
|
@ -191,8 +191,8 @@ pub fn build_file<'a>(
|
|||
exposed_closure_types,
|
||||
);
|
||||
|
||||
// TODO try to move as much of this linking as possible to the precompiled
|
||||
// platform, to minimize the amount of platform-application linking required.
|
||||
// TODO try to move as much of this linking as possible to the prebuilt platform,
|
||||
// to minimize the amount of platform-application linking required.
|
||||
let app_o_file = Builder::new()
|
||||
.prefix("roc_app")
|
||||
.suffix(&format!(".{}", app_extension))
|
||||
|
@ -330,7 +330,7 @@ pub fn build_file<'a>(
|
|||
}
|
||||
}
|
||||
|
||||
// Step 2: link the precompiled platform and compiled app
|
||||
// Step 2: link the prebuilt platform and compiled app
|
||||
let link_start = Instant::now();
|
||||
let problems = match (linking_strategy, link_type) {
|
||||
(LinkingStrategy::Surgical, _) => {
|
||||
|
|
|
@ -54,7 +54,7 @@ pub const FLAG_NO_LINK: &str = "no-link";
|
|||
pub const FLAG_TARGET: &str = "target";
|
||||
pub const FLAG_TIME: &str = "time";
|
||||
pub const FLAG_LINKER: &str = "linker";
|
||||
pub const FLAG_PRECOMPILED: &str = "precompiled-platform";
|
||||
pub const FLAG_PREBUILT: &str = "prebuilt-platform";
|
||||
pub const FLAG_CHECK: &str = "check";
|
||||
pub const FLAG_WASM_STACK_SIZE_KB: &str = "wasm-stack-size-kb";
|
||||
pub const ROC_FILE: &str = "ROC_FILE";
|
||||
|
@ -104,9 +104,9 @@ pub fn build_app<'a>() -> Command<'a> {
|
|||
.possible_values(["surgical", "legacy"])
|
||||
.required(false);
|
||||
|
||||
let flag_precompiled = Arg::new(FLAG_PRECOMPILED)
|
||||
.long(FLAG_PRECOMPILED)
|
||||
.help("Assume the platform has been precompiled and skip recompiling the platform\n(This is enabled by default when using `roc build` with a --target other than `--target host`.)")
|
||||
let flag_prebuilt = Arg::new(FLAG_PREBUILT)
|
||||
.long(FLAG_PREBUILT)
|
||||
.help("Assume the platform has been prebuilt and skip rebuilding the platform\n(This is enabled by default when using `roc build` with a --target other than `--target host`.)")
|
||||
.possible_values(["true", "false"])
|
||||
.required(false);
|
||||
|
||||
|
@ -143,7 +143,7 @@ pub fn build_app<'a>() -> Command<'a> {
|
|||
.arg(flag_debug.clone())
|
||||
.arg(flag_time.clone())
|
||||
.arg(flag_linker.clone())
|
||||
.arg(flag_precompiled.clone())
|
||||
.arg(flag_prebuilt.clone())
|
||||
.arg(flag_wasm_stack_size_kb.clone())
|
||||
.arg(
|
||||
Arg::new(FLAG_TARGET)
|
||||
|
@ -182,7 +182,7 @@ pub fn build_app<'a>() -> Command<'a> {
|
|||
.arg(flag_debug.clone())
|
||||
.arg(flag_time.clone())
|
||||
.arg(flag_linker.clone())
|
||||
.arg(flag_precompiled.clone())
|
||||
.arg(flag_prebuilt.clone())
|
||||
.arg(
|
||||
Arg::new(ROC_FILE)
|
||||
.help("The .roc file for the main module")
|
||||
|
@ -204,7 +204,7 @@ pub fn build_app<'a>() -> Command<'a> {
|
|||
.arg(flag_debug.clone())
|
||||
.arg(flag_time.clone())
|
||||
.arg(flag_linker.clone())
|
||||
.arg(flag_precompiled.clone())
|
||||
.arg(flag_prebuilt.clone())
|
||||
.arg(roc_file_to_run.clone())
|
||||
.arg(args_for_app.clone())
|
||||
)
|
||||
|
@ -217,7 +217,7 @@ pub fn build_app<'a>() -> Command<'a> {
|
|||
.arg(flag_debug.clone())
|
||||
.arg(flag_time.clone())
|
||||
.arg(flag_linker.clone())
|
||||
.arg(flag_precompiled.clone())
|
||||
.arg(flag_prebuilt.clone())
|
||||
.arg(roc_file_to_run.clone())
|
||||
.arg(args_for_app.clone())
|
||||
)
|
||||
|
@ -283,7 +283,7 @@ pub fn build_app<'a>() -> Command<'a> {
|
|||
.arg(flag_debug)
|
||||
.arg(flag_time)
|
||||
.arg(flag_linker)
|
||||
.arg(flag_precompiled)
|
||||
.arg(flag_prebuilt)
|
||||
.arg(roc_file_to_run.required(false))
|
||||
.arg(args_for_app);
|
||||
|
||||
|
@ -499,10 +499,10 @@ pub fn build(
|
|||
LinkingStrategy::Surgical
|
||||
};
|
||||
|
||||
let precompiled = if matches.is_present(FLAG_PRECOMPILED) {
|
||||
matches.value_of(FLAG_PRECOMPILED) == Some("true")
|
||||
let precompiled = if matches.is_present(FLAG_PREBUILT) {
|
||||
matches.value_of(FLAG_PREBUILT) == Some("true")
|
||||
} else {
|
||||
// When compiling for a different target, default to assuming a precompiled platform.
|
||||
// When compiling for a different target, default to assuming a prebuilt platform.
|
||||
// Otherwise compilation would most likely fail because many toolchains assume you're compiling for the host
|
||||
// We make an exception for Wasm, because cross-compiling is the norm in that case.
|
||||
triple != Triple::host() && !matches!(triple.architecture, Architecture::Wasm32)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue