Skip to content

compiletest: cdb version detection locally seems funky #133110

Open
@jieyouxu

Description

@jieyouxu
Member

While investigating #133107, it seems that even if I have a suitably-versioned cdb e.g. 10.0.26100.2161 in PATH, compiletest cdb version detection seems to consider that I failed to satisfy

//@ min-cdb-version: 10.0.26100.2161

Activity

added
A-compiletestArea: The compiletest test runner
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)
C-bugCategory: This is a bug.
E-needs-investigationCall for partcipation: This issues needs some investigation to determine current status
T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
on Nov 16, 2024
added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Nov 16, 2024
removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Nov 16, 2024
ChrisDenton

ChrisDenton commented on Nov 16, 2024

@ChrisDenton
Member

Looks like it just hard codes the path, aside from using ProgramFiles(x86) environment variable as the base directory:

fn find_cdb(target: &str) -> Option<OsString> {

jieyouxu

jieyouxu commented on Nov 16, 2024

@jieyouxu
MemberAuthor

That's kinda what I expected yeah. On one hand it saves you from having to manually specify it in PATH. On the other hand...

ChrisDenton

ChrisDenton commented on Nov 16, 2024

@ChrisDenton
Member

The simplest fix would be to check PATH first then fallback. However, it would be important to make sure that doesn't cause issues. E.g. we had problems with there being a msys2 link.exe that is not at all related to msvc's link.exe.

ChrisDenton

ChrisDenton commented on Nov 16, 2024

@ChrisDenton
Member

That said, I would note that there is a --cdb option for providing a path manually.

removed
E-needs-investigationCall for partcipation: This issues needs some investigation to determine current status
on Nov 16, 2024
jieyouxu

jieyouxu commented on Nov 16, 2024

@jieyouxu
MemberAuthor

That said, I would note that there is a --cdb option for providing a path manually.

AFAIK compiletest's cli are mostly for use by bootstrap, I'm not sure if that actually works. Maybe ./x test debuginfo -- --cdb=... but I haven't double-checked yet.

7 remaining items

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-compiletestArea: The compiletest test runnerA-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ChrisDenton@hkBst@jieyouxu@rustbot

        Issue actions

          compiletest: cdb version detection locally seems funky · Issue #133110 · rust-lang/rust