Skip to content

Add Validation and FullAnalysis output types, allow for early returns - #163670

Open
blyxyas wants to merge 1 commit into
rust-lang:mainfrom
blyxyas:go-to-stage-flag
Open

blyxyas wants to merge 1 commit into
rust-lang:mainfrom
blyxyas:go-to-stage-flag

Conversation

@blyxyas

@blyxyas blyxyas commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

View all comments

Add a Validation and FullAnalysis nightly output type. This allows us to encode metadata and exit both before and after executing analysis.

Old Body

Adds a go-to-stage flag, this flag makes the compiler exit after a certain stage. Currently it recognizes end (the default which is effectively a no-op), analysis for stopping after analysis and
nameres for stopping just after name resolution.

analysis is similar to --emit=metadata without link, and nameres will be used for the probe run in Cargo (See blyxyas/incr-systems#4)

Related to blyxyas/incr-systems#3 and rust-lang/goals#641
r? @jackh726

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 2, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbot

This comment has been minimized.

@jackh726 jackh726 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should add a new flag here - I think we should be reusing --emit.

I think we likely need a couple things:

  1. We need to ANALYSIS and ANALYSIS_FULL (or similar) output types to stop immediately after required and full analyses.
  2. I don't think we should be doing something like "if emitting depinfo and nothing else" but rather "needs XYZ". Because we may want to do `--emit=depinfo,metadata"

View changes since this review

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 5, 2026
@blyxyas blyxyas changed the title Add unstable go-to-stage option Add Validation and FullAnalysis output types, allow for early returns Oct 8, 2026
@rust-log-analyzer

This comment has been minimized.

@jackh726 jackh726 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few thoughts. Please squash too.

View changes since this review

Comment thread compiler/rustc_driver_impl/src/lib.rs Resolved
Comment thread compiler/rustc_driver_impl/src/lib.rs Resolved
Comment thread compiler/rustc_driver_impl/src/lib.rs Resolved

@celinval celinval left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a question, should the new output types be behind a unstable flag?

View changes since this review

Comment thread compiler/rustc_session/src/config.rs Outdated
shorthand: "validation",
extension: "rmeta",
description: "Generates metadata and exits after doing only validation and required analysis",
default_filename: "libCRATE_NAME.rmeta",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you considered giving it either a different extension or at least a different name? The extension could even be validation.rmeta. All the other output files have have different types.

With the current name schema it's not clear to me what will be the content of libCRATE_NAME.rmeta if user pass --emit=validation,full-analysis,rmeta.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally I gave it the same name because Cargo would know what kind of run it is. But having it in the filename is good for other build systems, thanks

Comment thread compiler/rustc_session/src/config.rs Outdated
Validation => {
shorthand: "validation",
extension: "rmeta",
description: "Generates metadata and exits after doing only validation and required analysis",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming the compiler will only exit if other outputs weren't required, right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@rust-log-analyzer

This comment has been minimized.

@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

Comment thread compiler/rustc_driver_impl/src/lib.rs Resolved

if sess.opts.output_types.stop_before_codegen() {
return None;
}

@bjorn3 bjorn3 Oct 29, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

codegen_and_build_linker already emits crate metadata through start_codegen. Why not move this into start_codegen after metadata emission and remove the above encode_and_write_metadata?

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that moving this check into codegen_and_build_linker would make the overall compiler workflow harder to follow (which is already a big problem). And would give codegen_and_build_linker even another responsability.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regular crate metadata is already handled there even for check-only builds. I think putting crate metadata subsets elsewhere would be even harder to follow.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we should move that metadata emission out of start_codegen, not the other way around. Having an --emit=dep-info,metadata compilation call a start_codegen function is extremely confusing. But that should be another PR.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skipping start_codegen for --emit=dep-info,metadata would mean that we did have to either duplicate the incr comp finalization code or split up Linker::link in nonsensical ways. Returning None for stop_before_codegen() will break incr comp as the incr comp session never gets finalized in Linker::link(). return None inside this function is only meant for errors or custom drivers that want to abort early without caring for incr comp.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that we did have to either duplicate the incr comp finalization code or split up Linker::link in nonsensical ways

My gripe with metadata inside link is not that that it's not returned early, but that it goes too far only because link_rlib and gives too many responsabilities to link.

I've opened #165524 to get some responsabilities out of link and start_codegen.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With that PR landed we still have the issue that returning None here breaks incr comp as Linker::link is responsible for finalizing the incr comp session.

Comment thread compiler/rustc_metadata/src/fs.rs Resolved
@rust-log-analyzer

This comment has been minimized.

Comment thread compiler/rustc_driver_impl/src/lib.rs Resolved
Comment thread compiler/rustc_driver_impl/src/lib.rs Resolved
Comment thread compiler/rustc_driver_impl/src/lib.rs Resolved
Comment thread compiler/rustc_interface/src/passes.rs Resolved
TDecking pushed a commit to TDecking/miri that referenced this pull request Nov 18, 2026
…n, r=bjorn3

Cleanup, Get emitting metadata out of codegen

Related to rust-lang/rust#163670 (comment)

While metadata is not completely out of `link`, emitting or modifying it is now done outside `link` and `start_codegen`.
Other miscellaneous non-codegen things are also taken out of `link`.

Best reviewed commit by commit.

r? @jackh726
@blyxyas blyxyas assigned jackh726 and unassigned jackh726 Nov 18, 2026
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

github-actions Bot pushed a commit to rust-lang/stdarch that referenced this pull request Nov 19, 2026
…n, r=bjorn3

Cleanup, Get emitting metadata out of codegen

Related to rust-lang/rust#163670 (comment)

While metadata is not completely out of `link`, emitting or modifying it is now done outside `link` and `start_codegen`.
Other miscellaneous non-codegen things are also taken out of `link`.

Best reviewed commit by commit.

r? @jackh726

@bjorn3 bjorn3 Nov 19, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: Can you remove some whitespace from the table to make it aligned again?

View changes since the review

@bjorn3

bjorn3 commented Nov 19, 2026

Copy link
Copy Markdown
Member

Would it make sense to move the OutputTypes move and run_required_analysis refactor to a separate PR? The former seems like the change in this PR that is most prone to random conflicts and both changes are IMO nice improvements independent of the rest of the changes in this PR.

@rust-log-analyzer

This comment has been minimized.

@rustbot

rustbot commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

rustfmt is developed in its own repository. If possible, consider making this change to rust-lang/rustfmt instead.

cc @rust-lang/rustfmt

@rustbot rustbot added the T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. label Nov 19, 2026
@rustbot

rustbot commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@blyxyas

blyxyas commented Nov 19, 2026

Copy link
Copy Markdown
Member Author

Would it make sense to move the OutputTypes move and run_required_analysis refactor to a separate PR?

I don't have a preference, I'm open to do it if you think it's worthwhile

@rust-log-analyzer

This comment has been minimized.

@bjorn3

bjorn3 commented Nov 19, 2026

Copy link
Copy Markdown
Member

I think it would be.

@blyxyas

blyxyas commented Nov 20, 2026 •

Copy link
Copy Markdown
Member Author

I've opened #166270, I'll remove those changes from here

@rustbot

This comment was marked as outdated.

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-aarch64-gnu-llvm-22-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [run-make] tests/run-make/rustc-help stdout ----

error: rmake recipe failed to complete
status: exit status: 101
command: cd "/checkout/obj/build/aarch64-unknown-linux-gnu/test/run-make/rustc-help/rmake_out" && env -u RUSTFLAGS -u __STD_REMAP_DEBUGINFO_ENABLED AR="ar" BUILD_ROOT="/checkout/obj/build/aarch64-unknown-linux-gnu" CC="cc" CC_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fPIC -w" CXX="c++" CXX_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fPIC -w" HOST_RUSTC_DYLIB_PATH="/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/lib" LD_LIBRARY_PATH=":/checkout/obj/build/aarch64-unknown-linux-gnu/stage0/lib/rustlib/aarch64-unknown-linux-gnu/lib" LD_LIB_PATH_ENVVAR="LD_LIBRARY_PATH" LLVM_BIN_DIR="/usr/lib/llvm-22/bin" LLVM_COMPONENTS="aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils abi aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgputargetmca amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cas cfguard cgdata codegen codegentypes core coroutines coverage debuginfobtf debuginfocodeview debuginfodwarf debuginfodwarflowlevel debuginfogsym debuginfologicalview debuginfomsf debuginfopdb demangle dlltooldriver dtlto dwarfcfichecker dwarflinker dwarflinkerclassic dwarflinkerparallel dwp engine executionengine extensions filecheck frontendatomic frontenddirective frontenddriver frontendhlsl frontendoffloading frontendopenacc frontendopenmp fuzzercli fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo hipstdpar instcombine instrumentation interfacestub interpreter ipo irprinter irreader jitlink lanai lanaiasmparser lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker loongarch loongarchasmparser loongarchcodegen loongarchdesc loongarchdisassembler loongarchinfo lto m68k m68kasmparser m68kcodegen m68kdesc m68kdisassembler m68kinfo mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts objcopy object objectyaml option orcdebugging orcjit orcshared orctargetprocess passes perfjitevents plugins powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvtargetmca runtimedyld sandboxir scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo spirv spirvanalysis spirvcodegen spirvdesc spirvinfo support supportlsp symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target targetparser telemetry textapi textapibinaryreader transformutils ve veasmparser vecodegen vectorize vedesc vedisassembler veinfo webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo webassemblyutils windowsdriver windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86targetmca xcore xcorecodegen xcoredesc xcoredisassembler xcoreinfo xray xtensa xtensaasmparser xtensacodegen xtensadesc xtensadisassembler xtensainfo" LLVM_FILECHECK="/usr/lib/llvm-22/bin/FileCheck" NODE="/usr/bin/node" PYTHON="/usr/bin/python3" RUSTC="/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" RUSTDOC="/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustdoc" SOURCE_ROOT="/checkout" TARGET="aarch64-unknown-linux-gnu" TARGET_EXE_DYLIB_PATH="/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/lib/rustlib/aarch64-unknown-linux-gnu/lib" __BOOTSTRAP_JOBS="4" __RMAKE_VERBOSE_SUBPROCESS_OUTPUT="1" __RUSTC_DEBUG_ASSERTIONS_ENABLED="1" __STD_DEBUG_ASSERTIONS_ENABLED="1" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/run-make/rustc-help/rmake"
stdout: none
--- stderr -------------------------------
LD_LIBRARY_PATH="/checkout/obj/build/aarch64-unknown-linux-gnu/test/run-make/rustc-help/rmake_out:/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/lib::/checkout/obj/build/aarch64-unknown-linux-gnu/stage0/lib/rustlib/aarch64-unknown-linux-gnu/lib" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "--help"
output status: `exit status: 0`
=== STDOUT ===
Usage: rustc [OPTIONS] INPUT

Options:
    -h, --help          Display this message
        --cfg <SPEC>    Configure the compilation environment.
                        SPEC supports the syntax `<NAME>[="<VALUE>"]`.
        --check-cfg <SPEC>
                        Provide list of expected cfgs for checking
    -L [<KIND>=]<PATH>  Add a directory to the library search path. The
                        optional KIND can be one of
                        <dependency|crate|native|framework|all> (default:
                        all).
    -l [<KIND>[:<MODIFIERS>]=]<NAME>[:<RENAME>]
                        Link the generated crate(s) to the specified native
                        library NAME. The optional KIND can be one of
                        <static|framework|dylib> (default: dylib).
                        Optional comma separated MODIFIERS
                        <bundle|verbatim|whole-archive|as-needed>
                        may be specified each with a prefix of either '+' to
                        enable or '-' to disable.
        --crate-type <bin|lib|rlib|dylib|cdylib|staticlib|proc-macro>
                        Comma separated list of types of crates
                        for the compiler to emit
        --crate-name <NAME>
                        Specify the name of the crate being built
        --edition <2015|2018|2021|2024|future>
                        Specify which edition of the compiler to use when
                        compiling code. The default is 2015 and the latest
                        stable edition is 2024.
        --emit <TYPE>[=<FILE>]
                        Comma separated list of types of output for the
                        compiler to emit.
                        Each TYPE has the default FILE name:
                        * dep-info - CRATE_NAME.d
                        * validation - CRATE_NAME.validation.rmeta
                        * full-analysis - CRATE_NAME.full-analysis.rmeta
                        * mir - CRATE_NAME.mir
                        * metadata - libCRATE_NAME.rmeta
                        * thin-link-bitcode - CRATE_NAME.indexing.o
                        * llvm-ir - CRATE_NAME.ll
                        * llvm-bc - CRATE_NAME.bc
                        * asm - CRATE_NAME.s
                        * obj - CRATE_NAME.o
                        * link - (platform and crate-type dependent)
        --print <INFO>[=<FILE>]
                        Compiler information to print on stdout (or to a file)
                        INFO may be one of
                        <all-target-specs-json|backend-has-mnemonic|backend-has-zstd|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|target-spec-json-schema|tls-models|wasm-proc-macro-tuple>.
    -g                  Equivalent to -C debuginfo=2
    -O                  Equivalent to -C opt-level=3
    -o <FILENAME>       Write output to FILENAME
        --out-dir <DIR> Write output to compiler-chosen filename in DIR
        --explain <OPT> Provide a detailed explanation of an error message
        --test          Build a test harness
        --target <TARGET>
                        Target tuple for which the code is compiled
    -A, --allow <LINT>  Set lint allowed
    -W, --warn <LINT>   Set lint warnings
        --force-warn <LINT>
                        Set lint force-warn
    -D, --deny <LINT>   Set lint denied
    -F, --forbid <LINT> Set lint forbidden
        --cap-lints <LEVEL>
                        Set the most restrictive lint level. More restrictive
                        lints are capped at this level
    -C, --codegen <OPT>[=<VALUE>]
                        Set a codegen option
    -V, --version       Print version info and exit
    -v, --verbose       Use verbose output

Additional help:
    -C help             Print codegen options
    -W help             Print 'lint' options and default settings
    -Z help             Print unstable compiler options
    --help -v           Print the full set of options rustc accepts




=== STDERR ===




thread 'main' (341521) panicked at /checkout/tests/run-make/rustc-help/rmake.rs:12:78:
test failed: `help.stdout` is different from `(rustc --help)`

--- help.stdout
+++ (rustc --help)
@@ -31,8 +31,8 @@
                         Comma separated list of types of output for the
                         compiler to emit.
                         Each TYPE has the default FILE name:
+                        * dep-info - CRATE_NAME.d
                         * validation - CRATE_NAME.validation.rmeta
-                        * dep-info - CRATE_NAME.d
                         * full-analysis - CRATE_NAME.full-analysis.rmeta
                         * mir - CRATE_NAME.mir
                         * metadata - libCRATE_NAME.rmeta

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------------------------------------------

---- [run-make] tests/run-make/rustc-help stdout end ----
---- [run-make] tests/run-make/unstable-output-types stdout ----

error: rmake recipe failed to complete
status: exit status: 101
command: cd "/checkout/obj/build/aarch64-unknown-linux-gnu/test/run-make/unstable-output-types/rmake_out" && env -u RUSTFLAGS -u __STD_REMAP_DEBUGINFO_ENABLED AR="ar" BUILD_ROOT="/checkout/obj/build/aarch64-unknown-linux-gnu" CC="cc" CC_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fPIC -w" CXX="c++" CXX_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fPIC -w" HOST_RUSTC_DYLIB_PATH="/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/lib" LD_LIBRARY_PATH=":/checkout/obj/build/aarch64-unknown-linux-gnu/stage0/lib/rustlib/aarch64-unknown-linux-gnu/lib" LD_LIB_PATH_ENVVAR="LD_LIBRARY_PATH" LLVM_BIN_DIR="/usr/lib/llvm-22/bin" LLVM_COMPONENTS="aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils abi aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgputargetmca amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cas cfguard cgdata codegen codegentypes core coroutines coverage debuginfobtf debuginfocodeview debuginfodwarf debuginfodwarflowlevel debuginfogsym debuginfologicalview debuginfomsf debuginfopdb demangle dlltooldriver dtlto dwarfcfichecker dwarflinker dwarflinkerclassic dwarflinkerparallel dwp engine executionengine extensions filecheck frontendatomic frontenddirective frontenddriver frontendhlsl frontendoffloading frontendopenacc frontendopenmp fuzzercli fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo hipstdpar instcombine instrumentation interfacestub interpreter ipo irprinter irreader jitlink lanai lanaiasmparser lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker loongarch loongarchasmparser loongarchcodegen loongarchdesc loongarchdisassembler loongarchinfo lto m68k m68kasmparser m68kcodegen m68kdesc m68kdisassembler m68kinfo mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts objcopy object objectyaml option orcdebugging orcjit orcshared orctargetprocess passes perfjitevents plugins powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvtargetmca runtimedyld sandboxir scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo spirv spirvanalysis spirvcodegen spirvdesc spirvinfo support supportlsp symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target targetparser telemetry textapi textapibinaryreader transformutils ve veasmparser vecodegen vectorize vedesc vedisassembler veinfo webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo webassemblyutils windowsdriver windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86targetmca xcore xcorecodegen xcoredesc xcoredisassembler xcoreinfo xray xtensa xtensaasmparser xtensacodegen xtensadesc xtensadisassembler xtensainfo" LLVM_FILECHECK="/usr/lib/llvm-22/bin/FileCheck" NODE="/usr/bin/node" PYTHON="/usr/bin/python3" RUSTC="/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" RUSTDOC="/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustdoc" SOURCE_ROOT="/checkout" TARGET="aarch64-unknown-linux-gnu" TARGET_EXE_DYLIB_PATH="/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/lib/rustlib/aarch64-unknown-linux-gnu/lib" __BOOTSTRAP_JOBS="4" __RMAKE_VERBOSE_SUBPROCESS_OUTPUT="1" __RUSTC_DEBUG_ASSERTIONS_ENABLED="1" __STD_DEBUG_ASSERTIONS_ENABLED="1" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/run-make/unstable-output-types/rmake"
stdout: none
--- stderr -------------------------------
LD_LIBRARY_PATH="/checkout/obj/build/aarch64-unknown-linux-gnu/test/run-make/unstable-output-types/rmake_out:/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/lib::/checkout/obj/build/aarch64-unknown-linux-gnu/stage0/lib/rustlib/aarch64-unknown-linux-gnu/lib" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "-L" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/run-make/unstable-output-types/rmake_out" "-Zthreads=1" "aux.rs" "--crate-type" "rlib" "--emit=full-analysis,metadata" "-Zunstable-options" "--target=aarch64-unknown-linux-gnu"
output status: `exit status: 0`
=== STDOUT ===



=== STDERR ===




thread 'main' (346619) panicked at /checkout/tests/run-make/unstable-output-types/rmake.rs:31:5:
assertion failed: Path::new(path).exists()
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
------------------------------------------

---- [run-make] tests/run-make/unstable-output-types stdout end ----

jhpratt added a commit to jhpratt/rust that referenced this pull request Nov 23, 2026
…jorn3

Output type refactors & change analysis query into required_analysis

Split from rust-lang#163670

We split OutputType from `config.rs` to `output.rs`, and because we only use full_analysis a single time in each compilation (at least currently), convert it to a regular function, and have `required_analysis` be the query.

r? @bjorn3
rust-bors Bot pushed a commit that referenced this pull request Nov 23, 2026
Rollup merge of #166270 - blyxyas:output-type-refactors, r=bjorn3

Output type refactors & change analysis query into required_analysis

Split from #163670

We split OutputType from `config.rs` to `output.rs`, and because we only use full_analysis a single time in each compilation (at least currently), convert it to a regular function, and have `required_analysis` be the query.

r? @bjorn3
@rust-bors

rust-bors Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #166371) made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

github-actions Bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Nov 23, 2026
Output type refactors & change analysis query into required_analysis

Split from rust-lang/rust#163670

We split OutputType from `config.rs` to `output.rs`, and because we only use full_analysis a single time in each compilation (at least currently), convert it to a regular function, and have `required_analysis` be the query.

r? @bjorn3
bjorn3 pushed a commit to rust-lang/rustc_codegen_cranelift that referenced this pull request Nov 24, 2026
Output type refactors & change analysis query into required_analysis

Split from rust-lang/rust#163670

We split OutputType from `config.rs` to `output.rs`, and because we only use full_analysis a single time in each compilation (at least currently), convert it to a regular function, and have `required_analysis` be the query.

r? @bjorn3

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-rustc-dev-guide Area: rustc-dev-guide S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants