mirror of
https://codeberg.org/kiss-community/repo
synced 2024-12-21 23:00:06 -07:00
rust: minor changes
- Build less tools. Reduces compilation times. If the now disabled tools are needed, fork the package. - Trim build directory paths in resulting binaries. - Minor changes.
This commit is contained in:
parent
31bf9188d9
commit
91a7ed6a4d
@ -1,5 +1,9 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
# Instruct the compiler to trim absolute paths in resulting binaries and instead
|
||||
# change them to relative paths ($PWD/... ./...).
|
||||
export RUSTFLAGS="$RUSTFLAGS --remap-path-prefix=$PWD=."
|
||||
|
||||
# This package mimics the download process of rust's 'x.py'
|
||||
# bootstrap library to allow for the removal of the internet
|
||||
# connection requirement per build.
|
||||
@ -41,7 +45,7 @@ submodules = false
|
||||
python = "python3"
|
||||
locked-deps = true
|
||||
vendor = true
|
||||
tools = ["cargo", "rls", "clippy", "rustfmt", "analysis", "src", "rust-demangler"]
|
||||
tools = [ "cargo" ]
|
||||
sanitizers = false
|
||||
profiler = false
|
||||
full-bootstrap = false
|
||||
@ -52,42 +56,42 @@ prefix = "/usr"
|
||||
[target.x86_64-unknown-linux-musl]
|
||||
llvm-config = "/usr/bin/llvm-config"
|
||||
crt-static = false
|
||||
sanitizers = false
|
||||
|
||||
[rust]
|
||||
channel = "stable"
|
||||
rpath = false
|
||||
debuginfo-level = 0
|
||||
debug = false
|
||||
backtrace = false
|
||||
jemalloc = false
|
||||
debug-assertions = false
|
||||
channel = "stable"
|
||||
codegen-tests = false
|
||||
codegen-units-std = 1
|
||||
codegen-units-std = 0
|
||||
debug = false
|
||||
debug-assertions = false
|
||||
debuginfo-level = 0
|
||||
incremental = false
|
||||
jemalloc = false
|
||||
rpath = false
|
||||
EOF
|
||||
|
||||
# Workaround to get Rust to build in llvm-only environments.
|
||||
# libgcc_s.so is needed for Rust's bootstrap binaries, on llvm-only systems
|
||||
# this library does not exist. This hack creates it as alias to libunwind.
|
||||
case $("$CC" -print-file-name=libunwind.so) in */*)
|
||||
printf 'llvm-libunwind = "system"\n' >> config.toml
|
||||
|
||||
# libgcc_s.so is needed for Rust's bootstrap binaries, on llvm-only systems
|
||||
# this library does not exist. This hack creates it as alias to libunwind.
|
||||
{
|
||||
mkdir -p libgcc
|
||||
mkdir -p libgcc
|
||||
|
||||
printf 'INPUT(-lunwind)\n' > \
|
||||
libgcc/libgcc_s.so
|
||||
printf 'INPUT(-lunwind)\n' > \
|
||||
libgcc/libgcc_s.so
|
||||
|
||||
ln -sf "$KISS_ROOT/usr/lib/libunwind.so.1" \
|
||||
libgcc/libgcc_s.so.1
|
||||
ln -sf "$KISS_ROOT/usr/lib/libunwind.so.1" \
|
||||
libgcc/libgcc_s.so.1
|
||||
|
||||
export \
|
||||
LD_LIBRARY_PATH="$PWD/libgcc:$LD_LIBRARY_PATH" \
|
||||
LIBRARY_PATH="$PWD/libgcc:$LIBRARY_PATH"
|
||||
}
|
||||
export \
|
||||
LD_LIBRARY_PATH="$PWD/libgcc:$LD_LIBRARY_PATH" \
|
||||
LIBRARY_PATH="$PWD/libgcc:$LIBRARY_PATH"
|
||||
esac
|
||||
|
||||
python3 ./x.py build -j "$(nproc)"
|
||||
python3 ./x.py install
|
||||
./x.py build -j "$(grep -scF 'core id' /proc/cpuinfo)"
|
||||
./x.py install
|
||||
|
||||
rm -rf \
|
||||
"$1/usr/lib/rustlib/src/" \
|
||||
|
@ -1,7 +1,7 @@
|
||||
cmake make
|
||||
curl make
|
||||
openssl
|
||||
llvm
|
||||
openssl
|
||||
pkgconf make
|
||||
python make
|
||||
xz
|
||||
|
Loading…
Reference in New Issue
Block a user