diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5851fdf507..8f8a9d0246 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v1 - name: Install LLVM - run: sudo ./ci/install-llvm.sh 8 + run: sudo ./ci/install-llvm.sh 10 - name: Enable LLD run: sudo ./ci/enable-lld.sh diff --git a/Cargo.lock b/Cargo.lock index 218757d115..e0c25435e0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -345,7 +345,7 @@ dependencies = [ [[package]] name = "inkwell" version = "0.1.0" -source = "git+https://github.com/rtfeldman/inkwell?tag=llvm8-0.release2#afdfd85c1183869e5d17b930c798c3087ff1c737" +source = "git+https://github.com/rtfeldman/inkwell?tag=llvm10-0.release1#005de45445d6ddae80f09ed012e6c3dfe674201a" dependencies = [ "either", "inkwell_internals", @@ -359,7 +359,7 @@ dependencies = [ [[package]] name = "inkwell_internals" version = "0.1.0" -source = "git+https://github.com/rtfeldman/inkwell?tag=llvm8-0.release2#afdfd85c1183869e5d17b930c798c3087ff1c737" +source = "git+https://github.com/rtfeldman/inkwell?tag=llvm10-0.release1#005de45445d6ddae80f09ed012e6c3dfe674201a" dependencies = [ "proc-macro2 0.4.30", "quote 0.6.13", @@ -410,9 +410,9 @@ checksum = "dea0c0405123bba743ee3f91f49b1c7cfb684eef0da0a50110f758ccf24cdff0" [[package]] name = "llvm-sys" -version = "80.1.2" +version = "100.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2969773884a5701f0c255e2a14d48d4522a66db898ec1088cb21879a228377" +checksum = "df29b4f2f4e8a5f7871ccad859aa17a171ba251da96bfd55224d53f48a96d2a2" dependencies = [ "cc", "lazy_static", diff --git a/ci/install-llvm.sh b/ci/install-llvm.sh index b9f076a8ae..0c327914ee 100755 --- a/ci/install-llvm.sh +++ b/ci/install-llvm.sh @@ -11,7 +11,7 @@ set -eux # read optional command line argument -LLVM_VERSION=9 +LLVM_VERSION=10 if [ "$#" -eq 1 ]; then LLVM_VERSION=$1 fi @@ -26,9 +26,9 @@ if [[ $EUID -ne 0 ]]; then fi declare -A LLVM_VERSION_PATTERNS -LLVM_VERSION_PATTERNS[8]="-8" LLVM_VERSION_PATTERNS[9]="-9" -LLVM_VERSION_PATTERNS[10]="" +LLVM_VERSION_PATTERNS[10]="-10" +LLVM_VERSION_PATTERNS[11]="" if [ ! ${LLVM_VERSION_PATTERNS[$LLVM_VERSION]+_} ]; then echo "This script does not support LLVM version $LLVM_VERSION" @@ -47,6 +47,8 @@ case "$DIST_VERSION" in Ubuntu_18.04 ) REPO_NAME="deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic$LLVM_VERSION_STRING main" ;; Ubuntu_18.10 ) REPO_NAME="deb http://apt.llvm.org/cosmic/ llvm-toolchain-cosmic$LLVM_VERSION_STRING main" ;; Ubuntu_19.04 ) REPO_NAME="deb http://apt.llvm.org/disco/ llvm-toolchain-disco$LLVM_VERSION_STRING main" ;; + Ubuntu_19.10 ) REPO_NAME="deb http://apt.llvm.org/eoan/ llvm-toolchain-eoan$LLVM_VERSION_STRING main" ;; + Ubuntu_20.04 ) REPO_NAME="deb http://apt.llvm.org/focal/ llvm-toolchain-focal$LLVM_VERSION_STRING main" ;; * ) echo "Distribution '$DISTRO' in version '$VERSION' is not supported by this script (${DIST_VERSION})." exit 2 @@ -57,4 +59,4 @@ esac wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - add-apt-repository "${REPO_NAME}" apt-get update -apt-get install -y clang-$LLVM_VERSION lld-$LLVM_VERSION +apt-get install -y clang-$LLVM_VERSION lldb-$LLVM_VERSION lld-$LLVM_VERSION clangd-$LLVM_VERSION diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 3d6d7f787e..7a4e0b8912 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -54,5 +54,5 @@ inlinable_string = "0.1.0" # commit of TheDan64/inkwell, push a new tag which points to the latest commit, # change the tag value in this Cargo.toml to point to that tag, and `cargo update`. # This way, GitHub Actions works and nobody's builds get broken. -inkwell = { git = "https://github.com/rtfeldman/inkwell", tag = "llvm8-0.release2" } +inkwell = { git = "https://github.com/rtfeldman/inkwell", tag = "llvm10-0.release1" } target-lexicon = "0.10" diff --git a/compiler/gen/Cargo.toml b/compiler/gen/Cargo.toml index 8d4f1ce41d..0b74a834a2 100644 --- a/compiler/gen/Cargo.toml +++ b/compiler/gen/Cargo.toml @@ -37,7 +37,7 @@ inlinable_string = "0.1.0" # commit of TheDan64/inkwell, push a new tag which points to the latest commit, # change the tag value in this Cargo.toml to point to that tag, and `cargo update`. # This way, GitHub Actions works and nobody's builds get broken. -inkwell = { git = "https://github.com/rtfeldman/inkwell", tag = "llvm8-0.release2" } +inkwell = { git = "https://github.com/rtfeldman/inkwell", tag = "llvm10-0.release1" } target-lexicon = "0.10" [dev-dependencies] diff --git a/compiler/gen/src/llvm/build.rs b/compiler/gen/src/llvm/build.rs index be435c503a..7694951747 100644 --- a/compiler/gen/src/llvm/build.rs +++ b/compiler/gen/src/llvm/build.rs @@ -1227,11 +1227,7 @@ fn clone_list<'a, 'ctx, 'env>( // one we just malloc'd. // // TODO how do we decide when to do the small memcpy vs the normal one? - builder - .build_memcpy(clone_ptr, ptr_bytes, elems_ptr, ptr_bytes, size) - .unwrap_or_else(|err| { - panic!("Error while attempting LLVM memcpy: {:?}", err); - }); + builder.build_memcpy(clone_ptr, ptr_bytes, elems_ptr, ptr_bytes, size); } else { panic!("TODO Cranelift currently only knows how to clone list elements that are Copy."); }