• Home
  • Raw
  • Download

Lines Matching +full:build +full:- +full:mode

13 use crate::Mode;
28 mode: Mode, field
32 /// Nightly-only features that are allowed (comma-separated list).
39 mode: Mode, in msg_tool() argument
44 ) -> Option<gha::Group> { in msg_tool()
45 match mode { in msg_tool()
47 Mode::ToolRustc => self.msg_sysroot_tool( in msg_tool()
48 Kind::Build, in msg_tool()
55 _ => self.msg(Kind::Build, build_stage, format_args!("tool {tool}"), *host, *target), in msg_tool()
63 fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { in should_run()
69 /// This will build the specified tool with the specified `host` compiler in
71 fn run(self, builder: &Builder<'_>) -> Option<PathBuf> { in run()
78 match self.mode { in run()
79 Mode::ToolRustc => { in run()
83 Mode::ToolStd => builder.ensure(compile::Std::new(compiler, target)), in run()
84 Mode::ToolBootstrap => {} // uses downloaded stage0 compiler libs in run()
85 _ => panic!("unexpected Mode for tool build"), in run()
91 self.mode, in run()
93 "build", in run()
102 self.mode, in run()
125 // compiletest confuses HTML tidy with the in-tree tidy. Name the in-tree tidy something in run()
128 tool = "rust-tidy"; in run()
130 let cargo_out = builder.cargo_out(compiler, self.mode, target).join(exe(tool, target)); in run()
141 mode: Mode, in prepare_tool_cargo() argument
147 ) -> CargoCommand { in prepare_tool_cargo()
148 let mut cargo = builder.cargo(compiler, mode, source_type, target, command); in prepare_tool_cargo()
150 cargo.arg("--manifest-path").arg(dir.join("Cargo.toml")); in prepare_tool_cargo()
153 if builder.build.config.cargo_native_static { in prepare_tool_cargo()
163 features.push("all-static".to_string()); in prepare_tool_cargo()
171 // if tools are using lzma we want to force the build script to build its in prepare_tool_cargo()
176 // import rustc-ap-rustc_attr which requires this to be set for the in prepare_tool_cargo()
201 cargo.arg("--features").arg(&features.join(", ")); in prepare_tool_cargo()
222 pub fn tool_exe(&self, tool: Tool) -> PathBuf {
226 compiler: self.compiler(0, self.config.build),
227 target: self.config.build,
244 fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
251 compiler: run.builder.compiler(0, run.builder.config.build),
256 fn run(self, builder: &Builder<'_>) -> PathBuf {
261 mode: if false $(|| $unstable)* {
262 // use in-tree libraries for unstable features
263 Mode::ToolStd
265 Mode::ToolBootstrap
276 }).expect("expected to build -- essential tool")
285 UnstableBookGen, "src/tools/unstable-book-gen", "unstable-book-gen";
290 BuildManifest, "src/tools/build-manifest", "build-manifest";
291 RemoteTestClient, "src/tools/remote-test-client", "remote-test-client";
292 RustInstaller, "src/tools/rust-installer", "rust-installer";
293 RustdocTheme, "src/tools/rustdoc-themes", "rustdoc-themes";
294 ExpandYamlAnchors, "src/tools/expand-yaml-anchors", "expand-yaml-anchors";
295 LintDocs, "src/tools/lint-docs", "lint-docs";
298 HtmlChecker, "src/tools/html-checker", "html-checker";
299 BumpStage0, "src/tools/bump-stage0", "bump-stage0";
300 … ReplaceVersionPlaceholder, "src/tools/replace-version-placeholder", "replace-version-placeholder";
301 CollectLicenseMetadata, "src/tools/collect-license-metadata", "collect-license-metadata";
302 GenerateCopyright, "src/tools/generate-copyright", "generate-copyright";
303 SuggestTests, "src/tools/suggest-tests", "suggest-tests";
304 GenerateWindowsSys, "src/tools/generate-windows-sys", "generate-windows-sys";
305 …RustdocGUITest, "src/tools/rustdoc-gui-test", "rustdoc-gui-test", is_unstable_tool = true, allow_f…
314 pub fn command(builder: &Builder<'_>) -> Command { in command()
315 // Error-index-generator links with the rustdoc library, so we need to add `rustc_lib_paths` in command()
317 let host = builder.config.build; in command()
330 fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { in should_run()
335 // Compile the error-index in the same stage as rustdoc to avoid in make_run()
339 // manually build the tool with `x.py build in make_run()
340 // src/tools/error-index-generator` which almost nobody does. in make_run()
344 run.builder.compiler(run.builder.top_stage.saturating_sub(1), run.builder.config.build); in make_run()
348 fn run(self, builder: &Builder<'_>) -> PathBuf { in run()
354 mode: Mode::ToolRustc, in run()
361 .expect("expected to build -- essential tool") in run()
374 fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { in should_run()
375 run.path("src/tools/remote-test-server") in should_run()
380 compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build), in make_run()
385 fn run(self, builder: &Builder<'_>) -> PathBuf { in run()
390 tool: "remote-test-server", in run()
391 mode: Mode::ToolStd, in run()
392 path: "src/tools/remote-test-server", in run()
398 .expect("expected to build -- essential tool") in run()
414 fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { in should_run()
422 // this as the compiler to build with, but rather this is "what in make_run()
428 fn run(self, builder: &Builder<'_>) -> PathBuf { in run()
437 // Similar to `compile::Assemble`, build with the previous stage's compiler. Otherwise in run()
441 let build_compiler = builder.compiler(target_compiler.stage - 1, builder.config.build); in run()
443 // When using `download-rustc` and a stage0 build_compiler, copying rustc doesn't actually in run()
444 // build stage0 libstd (because the libstd in sysroot has the wrong ABI). Explicitly build in run()
448 // NOTE: this implies that `download-rustc` is pretty useless when compiling with the stage0 in run()
452 …"warning: `download-rustc` does nothing when building stage1 tools; consider using `--stage 2` ins… in run()
461 // to build rustdoc. in run()
471 Mode::ToolRustc, in run()
473 "build", in run()
480 cargo.rustflag("--cfg=parallel_compiler"); in run()
484 Mode::ToolRustc, in run()
496 .cargo_out(build_compiler, Mode::ToolRustc, target) in run()
499 // don't create a stage0-sysroot/bin directory. in run()
525 fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { in should_run()
539 compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build), in make_run()
544 fn run(self, builder: &Builder<'_>) -> PathBuf { in run()
550 mode: Mode::ToolRustc, in run()
557 .expect("expected to build -- essential tool"); in run()
561 // Any build failures will be ignored. in run()
566 mode: Mode::ToolRustc, in run()
577 "cargo-credential-wincred", in run()
578 "src/tools/cargo/credential/cargo-credential-wincred", in run()
581 if self.target.contains("apple-darwin") { in run()
583 "cargo-credential-macos-keychain", in run()
584 "src/tools/cargo/credential/cargo-credential-macos-keychain", in run()
588 "cargo-credential-1password", in run()
589 "src/tools/cargo/credential/cargo-credential-1password", in run()
604 fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { in should_run()
608 fn run(self, builder: &Builder<'_>) -> PathBuf { in run()
613 tool: "lld-wrapper", in run()
614 mode: Mode::ToolStd, in run()
615 path: "src/tools/lld-wrapper", in run()
621 .expect("expected to build -- essential tool"); in run()
643 fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { in should_run()
645 run.path("src/tools/rust-analyzer").default_condition( in should_run()
651 .map_or(true, |tools| tools.iter().any(|tool| tool == "rust-analyzer")), in should_run()
657 compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build), in make_run()
662 fn run(self, builder: &Builder<'_>) -> Option<PathBuf> { in run()
666 tool: "rust-analyzer", in run()
667 mode: Mode::ToolStd, in run()
668 path: "src/tools/rust-analyzer", in run()
669 extra_features: vec!["rust-analyzer/in-rust-tree".to_owned()], in run()
688 fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { in should_run()
690 …// Allow building `rust-analyzer-proc-macro-srv` both as part of the `rust-analyzer` and as a stan… in should_run()
691 run.path("src/tools/rust-analyzer") in should_run()
692 .path("src/tools/rust-analyzer/crates/proc-macro-srv-cli") in should_run()
696 .any(|tool| tool == "rust-analyzer" || tool == "rust-analyzer-proc-macro-srv") in should_run()
702 compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build), in make_run()
707 fn run(self, builder: &Builder<'_>) -> Option<PathBuf> { in run()
711 tool: "rust-analyzer-proc-macro-srv", in run()
712 mode: Mode::ToolStd, in run()
713 path: "src/tools/rust-analyzer/crates/proc-macro-srv-cli", in run()
714 extra_features: vec!["sysroot-abi".to_owned()], in run()
720 // Copy `rust-analyzer-proc-macro-srv` to `<sysroot>/libexec/` in run()
721 // so that r-a can use it. in run()
724 builder.copy(&path, &libexec_path.join("rust-analyzer-proc-macro-srv")); in run()
753 fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
759 // build stable tools.
760 $stable || builder.build.unstable_features(),
764 "clippy" => $tool_name == "clippy-driver",
773 compiler: run.builder.compiler(run.builder.top_stage, run.builder.config.build),
780 fn run(mut $sel, $builder: &Builder<'_>) -> Option<PathBuf> {
785 mode: if false $(|| $tool_std)? { Mode::ToolStd } else { Mode::ToolRustc },
799 .cargo_out($sel.compiler, Mode::ToolRustc, $sel.target);
819 // to make `./x.py build <tool>` work.
821 // invoke Cargo to build bootstrap. See the comment there for more details.
823 Cargofmt, "src/tools/rustfmt", "cargo-fmt", stable=true;
824 CargoClippy, "src/tools/clippy", "cargo-clippy", stable=true;
825 …Clippy, "src/tools/clippy", "clippy-driver", stable=true, add_bins_to_sysroot = ["clippy-driver", …
827 …CargoMiri, "src/tools/miri/cargo-miri", "cargo-miri", stable=true, add_bins_to_sysroot = ["cargo-m…
832 RustDemangler, "src/tools/rust-demangler", "rust-demangler", stable=false, tool_std=true;
833 …Rustfmt, "src/tools/rustfmt", "rustfmt", stable=true, add_bins_to_sysroot = ["rustfmt", "cargo-fmt…
839 pub fn tool_cmd(&self, tool: Tool) -> Command { in tool_cmd()
841 let compiler = self.compiler(0, self.config.build); in tool_cmd()
848 self.build.rustc_snapshot_libdir(), in tool_cmd()
849 self.cargo_out(compiler, Mode::ToolBootstrap, *host).join("deps"), in tool_cmd()
852 // On MSVC a tool may invoke a C compiler (e.g., compiletest in run-make in tool_cmd()
853 // mode) and that C compiler may need some extra PATH modification. Do in tool_cmd()