← Back to Package List

native/rust@1_54_0

Basic Information

Package Namenative/rust@1_54_0
Version1.54.0
Typenative

Source Downloads

Download 1
tar.gz
SHA256: d3d3b84a100e71628afecf1125dbaa9bfc54ef9578c4fd81d75dca34c96f2565
Download 2
blob
SHA256: ac8511633e9b5a65ad030a1a2e5bdaa841fdfe3132f2baaa52cc04e71c6c6976
Path: ./rustc-1.54.0-src.tar.gz

Dependencies Explorer

Build Environment

*
PARLEVEL=$NUM_CORES

Build Steps

1.
*
patch -p1 < $PATCH_DIR/rust/codegen_c.cpp.patch
2.
*
if [ $(uname) = 'Darwin' ] && [ $(uname -m) = 'arm64' ]; then sed -i.bak 's/STD_ENV_ARCH=[a-zA-Z0-9_]*/STD_ENV_ARCH=aarch64/' script-overrides/stable-1.54.0-macos/build_std.txt; else echo not patching for macos; fi
3.
*
if [ $(uname) = 'Linux' ] && [ $(uname -m) = 'aarch64' ]; then sed -i.bak 's/STD_ENV_ARCH=[a-zA-Z0-9_]*/STD_ENV_ARCH=arm64/' script-overrides/stable-1.54.0-linux/build_std.txt; else echo not patching for linux; fi
4.
*
sed -i.bak 's/^make$/make $@/' build-1.54.0.sh
5.
*
if [ $(uname) = 'Darwin' ]; then sed -i.bak 's/^[[:space:]]*RUSTC_TARGET ?= x86_64-apple-darwin/RUSTC_TARGET ?= aarch64-apple-darwin/' run_rustc/Makefile; else true; fi
6.
*
echo >> build-1.54.0.sh
7.
*
echo make -C run_rustc >> build-1.54.0.sh
8.
*
env -i CXXFLAGS_EXTRA="$CFLAGS" LINKFLAGS_EXTRA="$LDFLAGS" PATH=$PATH PARLEVEL=$NUM_CORES ./build-1.54.0.sh -j$NUM_CORES
9.
none
# FIXME bad dylib paths embedded in the rustc binary, forcing install_name_tool dark magic
10.
*
mkdir -p $STAGING_DIR$PREFIX/native/bin
11.
*
mkdir -p $STAGING_DIR$PREFIX/native/lib
12.
*
cp -a run_rustc/output-1.54.0/prefix/bin/* $STAGING_DIR$PREFIX/native/bin
13.
*
if [ $(uname) = 'Linux' ]; then cp -a run_rustc/output-1.54.0/prefix/lib/rustlib/*/lib/*.so $STAGING_DIR$PREFIX/native/lib; else true; fi
14.
*
cp -a run_rustc/output-1.54.0/prefix/lib/* $STAGING_DIR$PREFIX/native/lib
15.
*
if [ $(uname) = 'Darwin' ]; then install_name_tool -change $PWD/run_rustc/output-1.54.0/build-rustc/aarch64-apple-darwin/release/deps/librustc_driver.dylib @loader_path/../lib/rustlib/aarch64-apple-darwin/lib/librustc_driver.dylib $STAGING_DIR$PREFIX/native/bin/rustc_binary; else true; fi
16.
*
if [ $(uname) = 'Darwin' ]; then install_name_tool -change $PWD/run_rustc/output-1.54.0/build-std2/aarch64-apple-darwin/release/deps/libstd.dylib @loader_path/../lib/rustlib/aarch64-apple-darwin/lib/libstd.dylib $STAGING_DIR$PREFIX/native/bin/rustc_binary; else true; fi
17.
*
if [ $(uname) = 'Darwin' ]; then install_name_tool -change $PWD/run_rustc/output-1.54.0/build-std2/aarch64-apple-darwin/release/deps/libstd.dylib @loader_path/libstd.dylib $STAGING_DIR$PREFIX/native/lib/rustlib/aarch64-apple-darwin/lib/librustc_driver.dylib; else true; fi
18.
*
$PREFIX/native/bootstrap/bin/perl $PREFIX/native/bootstrap/bin/strip-nondeterminism-recursive --directory $STAGING_DIR

Build Matrix

Target / Builder darwin_arm64 linux_amd64 linux_arm64
aarch64-apple-darwin
aarch64-apple-ios
aarch64-apple-ios-simulator
aarch64-linux-android
aarch64-linux-gnu
armv7a-linux-androideabi
x86_64-apple-darwin
x86_64-linux-android
x86_64-linux-gnu