-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10673 from imjasonh/rust-bootstrap-1.56
rust-bootstrap 1.56
- Loading branch information
Showing
2 changed files
with
151 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
package: | ||
name: rust-1.56 | ||
version: 1.56.0 | ||
epoch: 0 | ||
description: "Empowering everyone to build reliable and efficient software. (version 1.56.0)" | ||
copyright: | ||
- license: Apache-2.0 AND MIT | ||
dependencies: | ||
provides: | ||
- rust=${{package.full-version}} | ||
|
||
environment: | ||
contents: | ||
packages: | ||
- bash | ||
- build-base | ||
- busybox | ||
- ca-certificates-bundle | ||
- cmake | ||
- coreutils | ||
- curl-dev | ||
- file | ||
- libgit2-dev | ||
- libssh2-dev | ||
- ninja | ||
- openssl-dev | ||
- patch | ||
- perl | ||
- py3-setuptools | ||
- python3 | ||
- rust~1.55 | ||
- wasi-libc | ||
- xz-dev | ||
- zlib-dev | ||
|
||
pipeline: | ||
- uses: fetch | ||
working-directory: rustc-${{package.version}} | ||
with: | ||
uri: https://static.rust-lang.org/dist/rustc-${{package.version}}-src.tar.xz | ||
expected-sha256: f13468889833c88e744ad579c5d8fbb7ecb53216159b54481a90e5dcdaa9e320 | ||
|
||
- uses: patch | ||
working-directory: rustc-${{package.version}} | ||
with: | ||
patches: /home/build/llvm-add-cstdint.patch | ||
|
||
- name: Configure rustc | ||
working-directory: rustc-${{package.version}} | ||
runs: | | ||
# Fix distutils usage | ||
sed 's/distutils/setuptools/g' -i src/bootstrap/bootstrap.py | ||
export OPENSSL_NO_VENDOR=1 | ||
export RUST_BACKTRACE=1 | ||
export ARCH=${{host.triplet.rust}} | ||
export PKG_CONFIG_LIBDIR="${{vars.PKG_CONFIG_LIBDIR}}" | ||
export LIBSSH2_SYS_USE_PKG_CONFIG=1 | ||
export CFLAGS="${{vars.CFLAGS}}" | ||
export CPPFLAGS="${{vars.CPPFLAGS}}" | ||
export CXXFLAGS="${{vars.CXXFLAGS}}" | ||
./configure \ | ||
--host="${ARCH}" \ | ||
--target="${ARCH}" \ | ||
--prefix="/usr" \ | ||
--local-rust-root="/usr" \ | ||
--release-channel="stable" \ | ||
--enable-local-rust \ | ||
--disable-docs \ | ||
--enable-extended \ | ||
--tools="cargo,src" \ | ||
--enable-option-checking \ | ||
--enable-locked-deps \ | ||
--enable-vendor \ | ||
--python="python3" \ | ||
--set="rust.codegen-units=1" \ | ||
--set="rust.codegen-units-std=1" \ | ||
--set="rust.parallel-compiler=false" \ | ||
--set="target.${ARCH}.crt-static=false" | ||
# Fix up config | ||
sed -ri'' "s/(codegen-units =) '1'/\1 1/" config.toml | ||
sed -ri'' "s/(codegen-units-std =) '1'/\1 1/" config.toml | ||
- name: Build rustc | ||
working-directory: rustc-${{package.version}} | ||
runs: | | ||
sed 's/#deny-warnings = .*/deny-warnings = false/' -i config.toml | ||
sed 's|deny(warnings,|deny(|' -i src/bootstrap/lib.rs | ||
mkdir -p "${{targets.destdir}}/usr" | ||
unset CARGO_PROFILE_RELEASE_LTO | ||
unset CARGO_PROFILE_RELEASE_OPT_LEVEL | ||
unset CARGO_PROFILE_RELEASE_PANIC | ||
unset CARGO_PROFILE_RELEASE_CODEGEN_UNITS | ||
export PKG_CONFIG_LIBDIR="${{vars.PKG_CONFIG_LIBDIR}}" | ||
export LIBSSH2_SYS_USE_PKG_CONFIG=1 | ||
export CFLAGS="${{vars.CFLAGS}}" | ||
export CPPFLAGS="${{vars.CPPFLAGS}}" | ||
export CXXFLAGS="${{vars.CXXFLAGS}}" | ||
export OPENSSL_NO_VENDOR=1 | ||
export RUST_BACKTRACE=1 | ||
DESTDIR=${{targets.destdir}} python3 ./x.py install --jobs $(nproc) | ||
- uses: strip | ||
|
||
# delete uneeded files such as uninstallation scripts | ||
- runs: | | ||
rm ${{targets.destdir}}/usr/lib/rustlib/components | ||
rm ${{targets.destdir}}/usr/lib/rustlib/install.log | ||
rm ${{targets.destdir}}/usr/lib/rustlib/rust-installer-version | ||
rm ${{targets.destdir}}/usr/lib/rustlib/uninstall.sh | ||
rm ${{targets.destdir}}/usr/lib/rustlib/manifest-* | ||
# rustbuild always installs copies of the shared libraries to /usr/lib, | ||
# overwrite them with symlinks to the per-architecture versions | ||
- if: ${{build.arch}} == 'x86_64' | ||
runs: | | ||
cd ${{targets.destdir}} | ||
mkdir -p ${{targets.destdir}}/usr/lib32 | ||
ln -srft usr/lib32 usr/lib/rustlib/i686-unknown-linux-gnu/lib/*.so | ||
- runs: | | ||
cd ${{targets.destdir}} | ||
ln -srft usr/lib usr/lib/rustlib/${{build.arch}}-unknown-linux-gnu/lib/*.so | ||
vars: | ||
openssl-version: 1.1.1w | ||
libssh2-version: 1.11.0 | ||
sysroot: /home/build/sysroot | ||
PKG_CONFIG_LIBDIR: "/home/build/sysroot/lib/pkgconfig:/home/build/sysroot/share/pkgconfig:/usr/lib/pkgconfig" | ||
CFLAGS: "$CFLAGS -I/home/build/sysroot/include" | ||
CPPFLAGS: "$CPPFLAGS -I/home/build/sysroot/include" | ||
CXXFLAGS: "$CXXFLAGS -I/home/build/sysroot/include" | ||
|
||
update: | ||
enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- a/src/llvm-project/llvm/include/llvm/Support/Signals.h | ||
+++ b/src/llvm-project/llvm/include/llvm/Support/Signals.h | ||
@@ -15,6 +15,7 @@ | ||
#define LLVM_SUPPORT_SIGNALS_H | ||
|
||
#include <string> | ||
+#include <cstdint> | ||
|
||
namespace llvm { | ||
class StringRef; |