diff --git a/.travis.yml b/.travis.yml index a25c71a..5e713e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,25 @@ -sudo: required +sudo: false language: rust rust: nightly +os: + - linux + - osx + cache: cargo: true + directories: + - $HOME/Library/Caches/Homebrew addons: apt: packages: - qemu + homebrew: + packages: + - qemu env: matrix: @@ -21,15 +30,21 @@ env: install: - if [ $ARCH = riscv32 ]; then - export FILE="riscv64-unknown-elf-gcc-20181030-x86_64-linux-ubuntu14"; - wget https://static.dev.sifive.com/dev-tools/$FILE.tar.gz; - tar xf $FILE.tar.gz; - export PATH=$PATH:$PWD/$FILE/bin; + [ $TRAVIS_OS_NAME = linux ] && export FILE="riscv64-unknown-elf-gcc-20181127-x86_64-linux-ubuntu14"; + [ $TRAVIS_OS_NAME = osx ] && export FILE="riscv64-unknown-elf-gcc-20181127-x86_64-apple-darwin"; + wget https://static.dev.sifive.com/dev-tools/$FILE.tar.gz; + tar xf $FILE.tar.gz; + export PATH=$PATH:$PWD/$FILE/bin; fi - if [ $ARCH = aarch64 ]; then - wget https://web.stanford.edu/class/cs140e/files/aarch64-none-elf-linux-x64.tar.gz; - tar -xzvf aarch64-none-elf-linux-x64.tar.gz; - export PATH=$PATH:$PWD/aarch64-none-elf/bin; + if [ $TRAVIS_OS_NAME = linux ]; then + wget https://web.stanford.edu/class/cs140e/files/aarch64-none-elf-linux-x64.tar.gz; + tar -xzvf aarch64-none-elf-linux-x64.tar.gz; + export PATH=$PATH:$PWD/aarch64-none-elf/bin; + elif [ $TRAVIS_OS_NAME = osx ]; then + brew tap SergioBenitez/osxct; + brew install aarch64-none-elf; + fi; fi diff --git a/user/x86_64-ucore.json b/user/x86_64-ucore.json index c587146..a2691a5 100644 --- a/user/x86_64-ucore.json +++ b/user/x86_64-ucore.json @@ -7,6 +7,7 @@ "target-c-int-width": "32", "os": "none", "executables": true, + "linker": "rust-lld", "linker-flavor": "ld.lld", "panic-strategy": "abort", "disable-redzone": true,