| Age | Commit message (Collapse) | Author | Lines | 
|---|
|  |  | 
|  | In the rustc_llvm build script, don't consider arm64* to be 32-bit
The build script for `rustc_llvm` needs to detect 32-bit targets so that it links against `libatomics`. To do this, it matches the target architecture against `arm`, unfortunately incorrectly matches Arm64EC, Arm64E, etc.
This change adds a check that the target arch doesn't match `arm64`. | 
|  | definitively excluded | 
|  |  | 
|  |  | 
|  |  | 
|  | Enabling warning_into_errors() only whether it's in rust-lang/rust CI,
so deprecated uses of LLVM methods can be treated as errors. | 
|  | This saves about 30s. | 
|  | This obviously doesn't work when cross-compiling from Linux.
Split out from: https://github.com/rust-lang/rust/pull/140772 | 
|  | Co-authored-by: Ookiineko <chiisaineko@protonmail.com> | 
|  |  | 
|  |  | 
|  |  | 
|  | Signed-off-by: chloefeal <188809157+chloefeal@users.noreply.github.com> | 
|  |  | 
|  | Set LLVM_ENABLE_ZSTD alongside LLVM_ENABLE_ZLIB so that --compress-debug-sections=zstd is an option.
Use static linking to avoid a new runtime dependency. Add an llvm.libzstd bootstrap option for LLVM
with zstd. Set it off by default except for the dist builder. Handle llvm-config --system-libs output
that contains static libraries. | 
|  | We currently compile our LLVM bindings using `-DNDEBUG` if
debuginfo for LLVM is disabled. However, `NDEBUG` doesn't have
any relation to debuginfo, it controls whether assertions are
enabled.
Rename the environment variable to `LLVM_ASSERTIONS` and drive
it using the `llvm_assertions` option. Also drop the explicit
`debug(false)` call, as cc already sets this up using the
cargo `DEBUG` environment variable. | 
|  | While at it, order the list of architectures alphabetically. | 
|  |  | 
|  |  | 
|  | Require LLVM_CONFIG to be set in rustc_llvm/build.rs
This environment variable should always be set by bootstrap in `rustc_llvm_env`. The fallback is quite ugly and complicated, so removing it is nice.
https://github.com/rust-lang/rust/blob/bf71daedc29e7a240261acd1516378047e311a6f/src/bootstrap/src/core/build_steps/compile.rs#L1166
I tried finding when this was added in git history, but it pointed all the way to "add build scripts" at which point I stopped digging more. This has always been here.
cc `@nikic` `@cuviper` in case you happen to be aware of a deeper reason behind this
r? bootstrap | 
|  |  | 
|  |  | 
|  | This environment variable should always be set by bootstrap in
`rustc_llvm_env`. The fallback is quite ugly and complicated, so
removing it is nice. | 
|  |  | 
|  | rustc_llvm: Link to libkstat on Solaris/SPARC
getHostCPUName calls into libkstat but as of
LLVM 16.0.6 libLLVMTargetParser is not explicitly
linked against libkstat causing builds to fail
due to undefined symbols.
See also: llvm/llvm-project#64186 | 
|  |  | 
|  |  | 
|  | ...explaining why we need -latomic (gcc & g++ built for i486,
and LLVM insisting on use of 64-bit atomics). | 
|  | This restricts instructions to those offered by Pentium,
to support e.g. AMD Geode.
There is already an entry for this target in the NetBSD
platform support page at
  src/doc/rustc/src/platform-support/netbsd.md
...so this should forestall its removal.
Additional fixes are needed for some vendored modules, this
is the changes in the rust compiler core itself. | 
|  | rustc_llvm: Link to `zlib` on dragonfly and solaris
On native builds `llvm-config` picks up `zlib` and this gets pased into
the rust build tools, but on cross builds `llvm-config` is explicitly
ignored as it contains information for the host system and cannot be
trusted to be accurate for the target system.
Both DragonFly and Solaris contain `zlib` in the base system, so this is
both a safe assumption and required for a successful cross build unless
`zlib` support is disabled in LLVM.
This is more or less in the same vein as rust-lang#75713 and rust-lang#75655. | 
|  |  | 
|  | On native builds `llvm-config` picks up `zlib` and this gets pased into
the rust build tools, but on cross builds `llvm-config` is explicitly
ignored as it contains information for the host system and cannot be
trusted to be accurate for the target system.
Both DragonFly and Solaris contain `zlib` in the base system, so this is
both a safe assumption and required for a successful cross build unless
`zlib` support is disabled in LLVM.
This is more or less in the same vein as #75713 and #75655. | 
|  |  | 
|  | getHostCPUName calls into libkstat but as of
LLVM 16.0.6 libLLVMTargetParser is not explicitly
linked against libkstat causing builds to fail
due to undefined symbols.
See also: llvm/llvm-project#64186 | 
|  |  | 
|  |  | 
|  |  | 
|  | Convert all the crates that have had their diagnostic migration
completed (except save_analysis because that will be deleted soon and
apfloat because of the licensing problem). | 
|  | Fix build on powerpc-unknown-freebsd
Probably also fixes build on arm and mips*. Related to https://github.com/rust-lang/rust/issues/104220 | 
|  | Probably also fixes build on mips*. Related to https://github.com/rust-lang/rust/issues/104220 | 
|  | This allows it to be used by other codegen backends | 
|  |  | 
|  | OpenBSD)
- add platform-support documentation
- add riscv64gc-unknown-openbsd spec
- do not try to link with -latomic on openbsd | 
|  | This is needed since https://reviews.llvm.org/D128070. | 
|  |  | 
|  |  | 
|  | The majority of the code is only used by either rustbuild or
rustc_llvm's build script. Rust_build is compiled once for rustbuild and
once for every stage. This means that the majority of the code in this
crate is needlessly compiled multiple times. By moving only the code
actually used by the respective crates to rustbuild and rustc_llvm's
build script, this needless duplicate compilation is avoided. | 
|  | From Jessica Clarke (jrtc27@) | 
|  |  |