Skip to content

git: unknown option -C #146648

@samueltardieu

Description

@samueltardieu

Summary

Noticed on the CI, at line 14579 of https://github.com/rust-lang/rust/actions/runs/17765776652/job/50488786808:

[2025-09-16T13:18:47.049Z INFO  opt_dist::timer] Section `Stage 2 (LLVM PGO) > Build PGO instrumented LLVM` starts
[2025-09-16T13:18:47.049Z INFO  opt_dist::exec] Executing `LLVM_PROFILE_DIR=/tmp/tmp-multistage/opt-artifacts/llvm-pgo/prof-%p RUST_BACKTRACE=full python3 /checkout/x.py build --target x86_64-unknown-linux-gnu --host x86_64-unknown-linux-gnu --stage 2 library/std --llvm-profile-generate --keep-stage 0 --keep-stage 1 [at /checkout/obj]`
Unknown option: -C
usage: git [--version] [--help] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]

If this is the call to git at bootstrap.py around line 1194, it looks like it doesn't understand the -C global option (introduced in 1.8.5 released in 2013, …), maybe the cwd optional argument of Python's subprocess functions can be used instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions