Skip to content

Confusing output when checking crate with build script (?) #7921

@RalfJung

Description

@RalfJung

Problem

Running ./x.py check src/librustc_mir in the rustc repo produces output like this:

Checking std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
   Compiling cc v1.0.50
    Checking core v0.0.0 (/home/r/src/rust/rustc/src/libcore)
   Compiling libc v0.2.66
   Compiling autocfg v0.1.7
   Compiling std v0.0.0 (/home/r/src/rust/rustc/src/libstd)
   Compiling hashbrown v0.6.2
   Compiling compiler_builtins v0.1.25
   Compiling backtrace-sys v0.1.32
   Compiling unwind v0.0.0 (/home/r/src/rust/rustc/src/libunwind)
    Checking rustc-std-workspace-core v1.99.0 (/home/r/src/rust/rustc/src/tools/rustc-std-workspace-core)
    Checking cfg-if v0.1.10
    Checking alloc v0.0.0 (/home/r/src/rust/rustc/src/liballoc)
    Checking rustc-demangle v0.1.16
    Checking panic_abort v0.0.0 (/home/r/src/rust/rustc/src/libpanic_abort)
    Checking backtrace v0.3.44
    Checking rustc-std-workspace-alloc v1.99.0 (/home/r/src/rust/rustc/src/tools/rustc-std-workspace-alloc)
    Checking panic_unwind v0.0.0 (/home/r/src/rust/rustc/src/libpanic_unwind)
    Checking rustc-std-workspace-std v1.99.0 (/home/r/src/rust/rustc/src/tools/rustc-std-workspace-std)
    Checking term v0.0.0 (/home/r/src/rust/rustc/src/libterm)
    Checking proc_macro v0.0.0 (/home/r/src/rust/rustc/src/libproc_macro)
    Checking unicode-width v0.1.6
    Checking getopts v0.2.21
    Checking test v0.0.0 (/home/r/src/rust/rustc/src/libtest)
    Finished release [optimized + debuginfo] target(s) in 28.53s

Notice that it says "Compiling std", but "Checking core". That seems very odd.
With some extra levels of verbosity, I see the expected --emit=dep-info,metadata, so it looks like it is actually just checking std and not building it.

Possible Solution(s)

My guess is that the key difference between "core" and "std" here is that "std" has a build script. Of course it needs to actually compile the build script, not just check it. But describing that as "Compiling std" is pretty confusing, given that the actual library is not being built, just checked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-console-outputArea: Terminal output, colors, progress bar, etc.C-bugCategory: bugS-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions