doc: update manual/developing.rst.

This commit is contained in:
whitequark 2018-08-28 20:00:32 +00:00
parent ba6094c3e5
commit a5cd7d2761

View File

@ -95,9 +95,9 @@ and the ARTIQ kernels.
* Install LLVM and Clang: ::
$ cd ~/artiq-dev
$ git clone -b artiq-4.0 https://github.com/m-labs/llvm-or1k
$ git clone -b artiq-6.0 https://github.com/m-labs/llvm-or1k
$ cd llvm-or1k
$ git clone -b artiq-4.0 https://github.com/m-labs/clang-or1k tools/clang
$ git clone -b artiq-6.0 https://github.com/m-labs/clang-or1k tools/clang
$ mkdir build
$ cd build
@ -108,7 +108,7 @@ and the ARTIQ kernels.
* Install Rust: ::
$ cd ~/artiq-dev
$ git clone -b artiq-1.23.0 https://github.com/m-labs/rust
$ git clone -b artiq-1.28.0 https://github.com/m-labs/rust
$ cd rust
$ git submodule update --init --recursive
$ mkdir build
@ -118,18 +118,18 @@ and the ARTIQ kernels.
$ sudo chown $USER.$USER /usr/local/rust-or1k
$ make install
$ libs="core std_unicode alloc"
$ rustc="/usr/local/rust-or1k/bin/rustc --target or1k-unknown-none -C target-feature=+mul,+div,+ffl1,+cmov,+addc -C opt-level=s -g --crate-type rlib -L ."
$ destdir="/usr/local/rust-or1k/lib/rustlib/or1k-unknown-none/lib/"
$ mkdir ../build-or1k
$ cd ../build-or1k
$ for lib in ${libs}; do ${rustc} --crate-name ${lib} ../src/lib${lib}/lib.rs; done
$ ${rustc} --crate-name libc ../src/liblibc_mini/lib.rs
$ ${rustc} --crate-name unwind ../src/libunwind/lib.rs
$ ${rustc} -Cpanic=abort --crate-name panic_abort ../src/libpanic_abort/lib.rs
$ ${rustc} -Cpanic=unwind --crate-name panic_unwind ../src/libpanic_unwind/lib.rs --cfg llvm_libunwind
$ rustc="rustc --out-dir ${destdir} -L ${destdir} --target or1k-unknown-none -g -C target-feature=+mul,+div,+ffl1,+cmov,+addc -C opt-level=s --crate-type rlib"
$ mkdir -p ${destdir}
$ cp *.rlib ${destdir}
$ ${rustc} --crate-name core src/libcore/lib.rs
$ ${rustc} --crate-name compiler_builtins src/libcompiler_builtins/src/lib.rs --cfg $ 'feature="compiler-builtins"' --cfg 'feature="mem"'
$ ${rustc} --crate-name std_unicode src/libstd_unicode/lib.rs
$ ${rustc} --crate-name alloc src/liballoc/lib.rs
$ ${rustc} --crate-name libc src/liblibc_mini/lib.rs
$ ${rustc} --crate-name unwind src/libunwind/lib.rs
$ ${rustc} -Cpanic=abort --crate-name panic_abort src/libpanic_abort/lib.rs
$ ${rustc} -Cpanic=unwind --crate-name panic_unwind src/libpanic_unwind/lib.rs \
--cfg llvm_libunwind
.. note::
Compilation of LLVM can take more than 30 min on some machines. Compilation of Rust can take more than two hours.