Skip to content

Commit 273fccd

Browse files
committed
Auto merge of #100557 - dawnofmidnight:tarball-commit-info, r=Mark-Simulacrum
fix: use git-commit-info for version information Fixes #33286. Fixes #86587. This PR changes the current `git-commit-hash` file that `./x.py` dist puts in the `rustc-{version}-src.tar.{x,g}z` to contain the hash, the short hash, and the commit date from which the tarball was created, assuming git was available when it was. It uses this for reading the version so that rustc has all the appropriate metadata. # Testing Testing this is kind of a pain. I did it with something like ```sh ./x.py dist # ensure that `ignore-git` is `false` in config.toml cp ./build/dist/rustc-1.65.0-dev-src.tar.gz ../rustc-1.65.0-dev-src.tar.gz cd .. && tar -xzf rustc-1.65.0-dev-src && cd rustc-1.65.0-dev-src ./x.py build ``` Then, the output of `rustc -vV` with the stage1 compiler should have the `commit-hash` and `commit-date` fields filled, rather than be `unknown`. To be completely sure, you can use `rustc --sysroot` with the stdlib that the original `./x.py dist` made, which will require that the metadata matches.
2 parents dfa57d3 + d928f0c commit 273fccd

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)