Upgrade to LLVM 10

This commit is contained in:
Richard Feldman 2020-04-08 06:26:28 -04:00
parent bb7352fcd9
commit 9288e20469
6 changed files with 14 additions and 16 deletions

View file

@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Install LLVM - name: Install LLVM
run: sudo ./ci/install-llvm.sh 8 run: sudo ./ci/install-llvm.sh 10
- name: Enable LLD - name: Enable LLD
run: sudo ./ci/enable-lld.sh run: sudo ./ci/enable-lld.sh

8
Cargo.lock generated
View file

@ -345,7 +345,7 @@ dependencies = [
[[package]] [[package]]
name = "inkwell" name = "inkwell"
version = "0.1.0" 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 = [ dependencies = [
"either", "either",
"inkwell_internals", "inkwell_internals",
@ -359,7 +359,7 @@ dependencies = [
[[package]] [[package]]
name = "inkwell_internals" name = "inkwell_internals"
version = "0.1.0" 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 = [ dependencies = [
"proc-macro2 0.4.30", "proc-macro2 0.4.30",
"quote 0.6.13", "quote 0.6.13",
@ -410,9 +410,9 @@ checksum = "dea0c0405123bba743ee3f91f49b1c7cfb684eef0da0a50110f758ccf24cdff0"
[[package]] [[package]]
name = "llvm-sys" name = "llvm-sys"
version = "80.1.2" version = "100.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf2969773884a5701f0c255e2a14d48d4522a66db898ec1088cb21879a228377" checksum = "df29b4f2f4e8a5f7871ccad859aa17a171ba251da96bfd55224d53f48a96d2a2"
dependencies = [ dependencies = [
"cc", "cc",
"lazy_static", "lazy_static",

View file

@ -11,7 +11,7 @@
set -eux set -eux
# read optional command line argument # read optional command line argument
LLVM_VERSION=9 LLVM_VERSION=10
if [ "$#" -eq 1 ]; then if [ "$#" -eq 1 ]; then
LLVM_VERSION=$1 LLVM_VERSION=$1
fi fi
@ -26,9 +26,9 @@ if [[ $EUID -ne 0 ]]; then
fi fi
declare -A LLVM_VERSION_PATTERNS declare -A LLVM_VERSION_PATTERNS
LLVM_VERSION_PATTERNS[8]="-8"
LLVM_VERSION_PATTERNS[9]="-9" 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 if [ ! ${LLVM_VERSION_PATTERNS[$LLVM_VERSION]+_} ]; then
echo "This script does not support LLVM version $LLVM_VERSION" 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.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_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.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})." echo "Distribution '$DISTRO' in version '$VERSION' is not supported by this script (${DIST_VERSION})."
exit 2 exit 2
@ -57,4 +59,4 @@ esac
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
add-apt-repository "${REPO_NAME}" add-apt-repository "${REPO_NAME}"
apt-get update 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

View file

@ -54,5 +54,5 @@ inlinable_string = "0.1.0"
# commit of TheDan64/inkwell, push a new tag which points to the latest commit, # 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`. # 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. # 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" target-lexicon = "0.10"

View file

@ -37,7 +37,7 @@ inlinable_string = "0.1.0"
# commit of TheDan64/inkwell, push a new tag which points to the latest commit, # 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`. # 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. # 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" target-lexicon = "0.10"
[dev-dependencies] [dev-dependencies]

View file

@ -1227,11 +1227,7 @@ fn clone_list<'a, 'ctx, 'env>(
// one we just malloc'd. // one we just malloc'd.
// //
// TODO how do we decide when to do the small memcpy vs the normal one? // TODO how do we decide when to do the small memcpy vs the normal one?
builder builder.build_memcpy(clone_ptr, ptr_bytes, elems_ptr, ptr_bytes, size);
.build_memcpy(clone_ptr, ptr_bytes, elems_ptr, ptr_bytes, size)
.unwrap_or_else(|err| {
panic!("Error while attempting LLVM memcpy: {:?}", err);
});
} else { } else {
panic!("TODO Cranelift currently only knows how to clone list elements that are Copy."); panic!("TODO Cranelift currently only knows how to clone list elements that are Copy.");
} }