forked from M-Labs/artiq
Update to LLVM 4.0.
This commit is contained in:
parent
71eca5ad61
commit
c939c6183e
|
@ -22,7 +22,7 @@ llptr = ll.IntType(8).as_pointer()
|
||||||
llptrptr = ll.IntType(8).as_pointer().as_pointer()
|
llptrptr = ll.IntType(8).as_pointer().as_pointer()
|
||||||
llslice = ll.LiteralStructType([llptr, lli32])
|
llslice = ll.LiteralStructType([llptr, lli32])
|
||||||
llsliceptr = ll.LiteralStructType([llptr, lli32]).as_pointer()
|
llsliceptr = ll.LiteralStructType([llptr, lli32]).as_pointer()
|
||||||
llmetadata = ll.MetaData()
|
llmetadata = ll.MetaDataType()
|
||||||
|
|
||||||
|
|
||||||
def memoize(generator):
|
def memoize(generator):
|
||||||
|
|
|
@ -18,9 +18,9 @@ requirements:
|
||||||
- misoc 0.8.dev py35_30+gitd95f4edb
|
- misoc 0.8.dev py35_30+gitd95f4edb
|
||||||
- jesd204b 0.4
|
- jesd204b 0.4
|
||||||
- binutils-or1k-linux >=2.27
|
- binutils-or1k-linux >=2.27
|
||||||
- llvm-or1k
|
- llvm-or1k 4.0.1
|
||||||
- llvmlite-artiq 0.12.0
|
- llvmlite-artiq 0.12.0
|
||||||
- rust-core-or1k 1.20.0 16
|
- rust-core-or1k 1.22.1 17
|
||||||
- cargo 0.11.0
|
- cargo 0.11.0
|
||||||
- openocd 0.10.0+git1
|
- openocd 0.10.0+git1
|
||||||
- lit
|
- lit
|
||||||
|
|
|
@ -89,20 +89,20 @@ and the ARTIQ kernels.
|
||||||
* Install LLVM and Clang: ::
|
* Install LLVM and Clang: ::
|
||||||
|
|
||||||
$ cd ~/artiq-dev
|
$ cd ~/artiq-dev
|
||||||
$ git clone -b artiq-3.9 https://github.com/m-labs/llvm-or1k
|
$ git clone -b artiq-4.0 https://github.com/m-labs/llvm-or1k
|
||||||
$ cd llvm-or1k
|
$ cd llvm-or1k
|
||||||
$ git clone -b artiq-3.9 https://github.com/m-labs/clang-or1k tools/clang
|
$ git clone -b artiq-4.0 https://github.com/m-labs/clang-or1k tools/clang
|
||||||
|
|
||||||
$ mkdir build
|
$ mkdir build
|
||||||
$ cd build
|
$ cd build
|
||||||
$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/llvm-or1k -DLLVM_TARGETS_TO_BUILD="OR1K;X86" -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_INSTALL_UTILS=ON -DCLANG_ENABLE_ARCMT=OFF -DCLANG_ENABLE_STATIC_ANALYZER=OFF
|
$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/llvm-or1k -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=OR1K -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_INSTALL_UTILS=ON -DCLANG_ENABLE_ARCMT=OFF -DCLANG_ENABLE_STATIC_ANALYZER=OFF
|
||||||
$ make -j4
|
$ make -j4
|
||||||
$ sudo make install
|
$ sudo make install
|
||||||
|
|
||||||
* Install Rust: ::
|
* Install Rust: ::
|
||||||
|
|
||||||
$ cd ~/artiq-dev
|
$ cd ~/artiq-dev
|
||||||
$ git clone -b artiq-1.20.0 https://github.com/m-labs/rust
|
$ git clone -b artiq-1.22.1 https://github.com/m-labs/rust
|
||||||
$ cd rust
|
$ cd rust
|
||||||
$ git submodule update --init
|
$ git submodule update --init
|
||||||
$ mkdir build
|
$ mkdir build
|
||||||
|
@ -112,14 +112,16 @@ and the ARTIQ kernels.
|
||||||
$ sudo chown $USER.$USER /usr/local/rust-or1k
|
$ sudo chown $USER.$USER /usr/local/rust-or1k
|
||||||
$ make install
|
$ make install
|
||||||
|
|
||||||
$ libs="libcore libstd_unicode liballoc liblibc_mini libunwind"
|
$ libs="core std_unicode alloc"
|
||||||
$ rustc="/usr/local/rust-or1k/bin/rustc --target or1k-unknown-none -g -C target-feature=+mul,+div,+ffl1,+cmov,+addc -C opt-level=s -L ."
|
$ 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/"
|
$ destdir="/usr/local/rust-or1k/lib/rustlib/or1k-unknown-none/lib/"
|
||||||
$ mkdir ../build-or1k
|
$ mkdir ../build-or1k
|
||||||
$ cd ../build-or1k
|
$ cd ../build-or1k
|
||||||
$ for lib in ${libs}; do ${rustc} ../src/${lib}/lib.rs; done
|
$ for lib in ${libs}; do ${rustc} --crate-name ${lib} ../src/lib${lib}/lib.rs; done
|
||||||
$ ${rustc} -Cpanic=abort ../src/libpanic_abort/lib.rs
|
$ ${rustc} --crate-name libc ../src/liblibc_mini/lib.rs
|
||||||
$ ${rustc} -Cpanic=unwind ../src/libpanic_unwind/lib.rs --cfg llvm_libunwind
|
$ ${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
|
||||||
$ mkdir -p ${destdir}
|
$ mkdir -p ${destdir}
|
||||||
$ cp *.rlib ${destdir}
|
$ cp *.rlib ${destdir}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue