diff --git a/crates/cli/src/build.rs b/crates/cli/src/build.rs index a85906eaab..a24696f1c8 100644 --- a/crates/cli/src/build.rs +++ b/crates/cli/src/build.rs @@ -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 hosts from there. + // a package repository, as we can then get precompiled platforms from there. let exposed_values = loaded .exposed_to_host @@ -192,7 +192,7 @@ pub fn build_file<'a>( ); // TODO try to move as much of this linking as possible to the precompiled - // host, to minimize the amount of host-application linking required. + // platform, to minimize the amount of host-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 host and compiled app + // Step 2: link the precompiled platform and compiled app let link_start = Instant::now(); let problems = match (linking_strategy, link_type) { (LinkingStrategy::Surgical, _) => { diff --git a/crates/cli/src/lib.rs b/crates/cli/src/lib.rs index 1f4607dc6b..b800f88d1d 100644 --- a/crates/cli/src/lib.rs +++ b/crates/cli/src/lib.rs @@ -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-host"; +pub const FLAG_PRECOMPILED: &str = "precompiled-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"; @@ -106,7 +106,7 @@ pub fn build_app<'a>() -> Command<'a> { let flag_precompiled = Arg::new(FLAG_PRECOMPILED) .long(FLAG_PRECOMPILED) - .help("Assume the host has been precompiled and skip recompiling the host\n(This is enabled by default when using `roc build` with a --target other than `--target host`.)") + .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`.)") .possible_values(["true", "false"]) .required(false); @@ -502,7 +502,7 @@ pub fn build( let precompiled = if matches.is_present(FLAG_PRECOMPILED) { matches.value_of(FLAG_PRECOMPILED) == Some("true") } else { - // When compiling for a different target, default to assuming a precompiled host. + // When compiling for a different target, default to assuming a precompiled 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) diff --git a/crates/cli/tests/cli_run.rs b/crates/cli/tests/cli_run.rs index aa85d8b483..0ea0fde50d 100644 --- a/crates/cli/tests/cli_run.rs +++ b/crates/cli/tests/cli_run.rs @@ -27,7 +27,7 @@ mod cli_run { const OPTIMIZE_FLAG: &str = concatcp!("--", roc_cli::FLAG_OPTIMIZE); const LINKER_FLAG: &str = concatcp!("--", roc_cli::FLAG_LINKER); const CHECK_FLAG: &str = concatcp!("--", roc_cli::FLAG_CHECK); - const PRECOMPILED_HOST: &str = concatcp!("--", roc_cli::FLAG_PRECOMPILED, "=true"); + const PRECOMPILED_PLATFORM: &str = concatcp!("--", roc_cli::FLAG_PRECOMPILED, "=true"); #[allow(dead_code)] const TARGET_FLAG: &str = concatcp!("--", roc_cli::FLAG_TARGET); @@ -586,8 +586,8 @@ mod cli_run { ran_without_optimizations = true; }); - // now we can pass the `PRECOMPILED_HOST` flag, because the `call_once` will - // have compiled the host + // now we can pass the `PRECOMPILED_PLATFORM` flag, because the `call_once` will + // have compiled the platform if !ran_without_optimizations { // Check with and without optimizations @@ -595,7 +595,7 @@ mod cli_run { &file_name, benchmark.stdin, benchmark.executable_filename, - &[PRECOMPILED_HOST], + &[PRECOMPILED_PLATFORM], &app_args, benchmark.expected_ending, benchmark.use_valgrind, @@ -606,7 +606,7 @@ mod cli_run { &file_name, benchmark.stdin, benchmark.executable_filename, - &[PRECOMPILED_HOST, OPTIMIZE_FLAG], + &[PRECOMPILED_PLATFORM, OPTIMIZE_FLAG], &app_args, benchmark.expected_ending, benchmark.use_valgrind, diff --git a/crates/compiler/build/src/program.rs b/crates/compiler/build/src/program.rs index 060a2bcf0b..739566151d 100644 --- a/crates/compiler/build/src/program.rs +++ b/crates/compiler/build/src/program.rs @@ -495,7 +495,7 @@ fn gen_from_mono_module_dev_wasm32( let host_bytes = std::fs::read(preprocessed_host_path).unwrap_or_else(|_| { panic!( - "Failed to read host object file {}! Try setting --precompiled-host=false", + "Failed to read host object file {}! Try setting --precompiled-platform=false", preprocessed_host_path.display() ) });