Browse Source

More notes on rust

master
mid-kid 2 years ago
parent
commit
6f85ff6a41
  1. 4
      rust/build_rust.sh
  2. 10
      rust/install_gentoo.txt

4
rust/build_rust.sh

@ -20,6 +20,7 @@ cd "rustc-$version_rustc-src"
--local-rust-root="$PWD/../install-rustc-$version_rustc_bootstrap" \ --local-rust-root="$PWD/../install-rustc-$version_rustc_bootstrap" \
--llvm-root="$PWD/../install-llvm-$version_llvm" \ --llvm-root="$PWD/../install-llvm-$version_llvm" \
--enable-vendor --enable-vendor
# --enable-llvm-link-shared
case "$version_rustc" in case "$version_rustc" in
1.3[0-9].*|1.4[0-6].*) 1.3[0-9].*|1.4[0-6].*)
@ -28,6 +29,9 @@ case "$version_rustc" in
paths='library/std src/librustc cargo' ;; paths='library/std src/librustc cargo' ;;
esac esac
# ./x.py install --stage 1 compiler/rustc library/std
# ./x.py install --stage 0 cargo
# Build and install # Build and install
mkdir -p "$dir_install" mkdir -p "$dir_install"
./x.py install $MAKEFLAGS --stage 2 $paths ./x.py install $MAKEFLAGS --stage 2 $paths

10
rust/install_gentoo.txt

@ -0,0 +1,10 @@
Install to /usr/lib/rust/<ver>
ver=<ver>
cp /usr/lib/rust/$ver/bin/{rustc,rustc-$ver}
ln -s /usr/lib/rust/$ver/bin/rustc-$ver /usr/bin/rustc-$ver
touch /etc/env.d/rust/provider-rust-$ver
emerge -1 app-eselect/eselect-rust
eselect rust set rust-$ver
emerge -O1 dev-lang/rust
(might need to set CC=clang and CXX=clang++ for initial build...)
Loading…
Cancel
Save