The build requires an unwrapped clang due to passing in --arch flags.
However, for c++ it doesn't pass in --arch and requires standard headers
so which requires the wrapped compiler.
The codesign binary is part of the bootstrapTools and is incompatible
with the version required by the compiler_rt build. Remove
find_program(.., codesign) from the cmake files to prevent the build
from using and then breaking due to an incompatible codesign
The PR which fixed `useLLVM` native rustc builds (#320432)
also broke cross builds.
The C compiler it used to produce `llvmShared` and `llvmPackages`,
`llvmPackages.clangUseLLVM`, was built to run on the host
and create binaries for the target (`pkgsHostTarget`).
Instead, the compiler should be built to run on the build
machine and produce binaries for the host machine (`pkgsBuildHost`).
Replace the overridden compilers with ones from `pkgsBuildHost`
Co-Authored-By: Artemis Tosini <me@artem.ist>
Unfortunately, it won't be possible to build 9.12 nor, in all
likelihood, 9.14 with Cabal 3.12 or 3.14 (which are shipped with GHC 9.8
and 9.10, respectively) due to
<145a647785>.
Since this has been confirmed by upstream, we'll have to bite the bullet
and adjust our hadrian bootstrapping logic to deal with that.
Fortunately, we at least have gotten a hackage released version of Cabal
3.14, so we don't need to bootstrap from an in tree Cabal version.
Change the bootstrap on all platforms to use a version of the upstream binary
that is equal to the version that is being built, instead of a binary of one
version prior. This is necessary for the 1.82.0 release because on some
platforms (https://github.com/rust-lang/rust/issues/129268) the 1.81.0 binary
can not build the 1.82.0 source. Furthermore, upstream reported that their
development process (now) usually involves building a release compiler with
itself and that "the Rust compiler must be able to build itself".