Repository: rust
Issue: After building from https://static.rust-lang.org/dist/rustc-1.83.0-src.tar.xz, rustc --version prints `-nightly`
Labels: T-bootstrap,C-bug

Upacking https://static.rust-lang.org/dist/rustc-1.83.0-src.tar.xz and executing `./configure  --enable-optimize-llvm --enable-extended --llvm-root=/usr/local --enable-profiler --enable-llvm-link-shared --enable-sanitizers --disable-docs --target=x86_64-unknown-linux-gnu && x.py install && rustc --version` produces the configuration file below, and prints

> rustc 1.83.0-nightly (90b35a623 2024-11-26) (built from a source tarball)

* The version string should not include `-nightly`
<details>
<summary>Produced config.toml</summary>

```toml
# Use different pre-set defaults than the global defaults.
#
# See `src/bootstrap/defaults` for more information.
# Note that this has no default value (x.py uses the defaults in `config.example.toml`).
profile = 'dist'

[llvm]

# Indicates whether the LLVM build is a Release or Debug build
optimize = true

# Whether to build LLVM as a dynamically linked library (as opposed to statically linked).
# Under the hood, this passes `--shared` to llvm-config.
# NOTE: To avoid performing LTO multiple times, we suggest setting this to `true` when `thin-lto` is enabled.
link-shared = true

[build]

# Which triples to build libraries (core/alloc/std/test/proc_macro) for. Each of these triples will
# be bootstrapped from the build triple themselves. In other words, this is the list of triples for
# which to build a library that can CROSS-COMPILE to that triple.
#
# Defaults to `host`. If you set this explicitly, you likely want to add all
# host triples to this list as well in order for those host toolchains to be
# able to compile programs for their native target.
target = ['x86_64-unknown-linux-gnu']

# Whether to build documentation by default. If false, rustdoc and
# friends will still be compiled but they will not be used to generate any
# documentation.
#
# You can still build documentation when this is disabled by explicitly passing paths,
# e.g. `x doc library`.
docs = false

# Enable a build of the extended Rust tool set which is not only the compiler
# but also tools such as Cargo. This will also produce "combined installers"
# which are used to install Rust and Cargo together.
# The `tools` (check `config.example.toml` to see its default value) option specifies
# which tools should be built if `extended = true`.
#
# This is disabled by default.
extended = true

# Build the sanitizer runtimes
sanitizers = true

# Build the profiler runtime (required when compiling with options that depend
# on this runtime, such as `-C profile-generate` or `-C instrument-coverage`).
profiler = true

# Arguments passed to the `./configure` script, used during distcheck. You
# probably won't fill this in but rather it's filled in by the `./configure`
# script. Useful for debugging.
configure-args = ['--enable-optimize-llvm', '--enable-extended', '--llvm-root=/usr/local', '--enable-profiler', '--enable-llvm-link-shared', '--enable-sanitizers', '--disable-docs', '--target=x86_64-unknown-linux-gnu']

[install]

[rust]

[target.x86_64-unknown-linux-gnu]

# Path to the `llvm-config` binary of the installation of a custom LLVM to link
# against. Note that if this is specified we don't compile LLVM at all for this
# target.
llvm-config = '/usr/local/bin/llvm-config'

[dist]
```

</details>