Skip to content

Commit

Permalink
chore: downgrade to Rust 1.69 (denoland#19407)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Jun 7, 2023
1 parent da9db88 commit 7e91f74
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 28 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as yaml from "https://deno.land/[email protected]/encoding/yaml.ts";
// Bump this number when you want to purge the cache.
// Note: the tools/release/01_bump_crate_versions.ts script will update this version
// automatically via regex, so ensure that this line maintains this format.
const cacheVersion = 34;
const cacheVersion = 35;

const Runners = (() => {
const ubuntuRunner = "ubuntu-22.04";
Expand All @@ -24,16 +24,16 @@ const prCacheKeyPrefix =
`${cacheVersion}-cargo-target-\${{ matrix.os }}-\${{ matrix.profile }}-\${{ matrix.job }}-`;

const installPkgsCommand =
"sudo apt-get install --no-install-recommends debootstrap clang-16 lld-16";
"sudo apt-get install --no-install-recommends debootstrap clang-15 lld-15";
const sysRootStep = {
name: "Set up incremental LTO and sysroot build",
run: `# Avoid running man-db triggers, which sometimes takes several minutes
# to complete.
sudo apt-get remove --purge -y man-db
# Install clang-16, lld-16, and debootstrap.
echo "deb http:https://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" |
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-jammy-16.list
# Install clang-15, lld-15, and debootstrap.
echo "deb http:https://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" |
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-jammy-15.list
curl https://apt.llvm.org/llvm-snapshot.gpg.key |
gpg --dearmor |
sudo dd of=/etc/apt/trusted.gpg.d/llvm-snapshot.gpg
Expand Down Expand Up @@ -70,8 +70,8 @@ CARGO_PROFILE_RELEASE_INCREMENTAL=false
CARGO_PROFILE_RELEASE_LTO=false
RUSTFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-16
-C link-arg=-fuse-ld=lld-16
-C linker=clang-15
-C link-arg=-fuse-ld=lld-15
-C link-arg=--sysroot=/sysroot
-C link-arg=-ldl
-C link-arg=-Wl,--allow-shlib-undefined
Expand All @@ -81,16 +81,16 @@ RUSTFLAGS<<__1
__1
RUSTDOCFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-16
-C link-arg=-fuse-ld=lld-16
-C linker=clang-15
-C link-arg=-fuse-ld=lld-15
-C link-arg=--sysroot=/sysroot
-C link-arg=-ldl
-C link-arg=-Wl,--allow-shlib-undefined
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
-C link-arg=-Wl,--thinlto-cache-policy,cache_size_bytes=700m
\${{ env.RUSTFLAGS }}
__1
CC=clang-16
CC=clang-15
CFLAGS=-flto=thin --sysroot=/sysroot
__0`,
};
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,15 @@ jobs:
# to complete.
sudo apt-get remove --purge -y man-db
# Install clang-16, lld-16, and debootstrap.
echo "deb http:https://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" |
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-jammy-16.list
# Install clang-15, lld-15, and debootstrap.
echo "deb http:https://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" |
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-jammy-15.list
curl https://apt.llvm.org/llvm-snapshot.gpg.key |
gpg --dearmor |
sudo dd of=/etc/apt/trusted.gpg.d/llvm-snapshot.gpg
sudo apt-get update
# this was unreliable sometimes, so try again if it fails
sudo apt-get install --no-install-recommends debootstrap clang-16 lld-16 || echo 'Failed. Trying again.' && sudo apt-get clean && sudo apt-get update && sudo apt-get install --no-install-recommends debootstrap clang-16 lld-16
sudo apt-get install --no-install-recommends debootstrap clang-15 lld-15 || echo 'Failed. Trying again.' && sudo apt-get clean && sudo apt-get update && sudo apt-get install --no-install-recommends debootstrap clang-15 lld-15
# Create ubuntu-16.04 sysroot environment, which is used to avoid
# depending on a very recent version of glibc.
Expand Down Expand Up @@ -249,8 +249,8 @@ jobs:
CARGO_PROFILE_RELEASE_LTO=false
RUSTFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-16
-C link-arg=-fuse-ld=lld-16
-C linker=clang-15
-C link-arg=-fuse-ld=lld-15
-C link-arg=--sysroot=/sysroot
-C link-arg=-ldl
-C link-arg=-Wl,--allow-shlib-undefined
Expand All @@ -260,16 +260,16 @@ jobs:
__1
RUSTDOCFLAGS<<__1
-C linker-plugin-lto=true
-C linker=clang-16
-C link-arg=-fuse-ld=lld-16
-C linker=clang-15
-C link-arg=-fuse-ld=lld-15
-C link-arg=--sysroot=/sysroot
-C link-arg=-ldl
-C link-arg=-Wl,--allow-shlib-undefined
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
-C link-arg=-Wl,--thinlto-cache-policy,cache_size_bytes=700m
${{ env.RUSTFLAGS }}
__1
CC=clang-16
CC=clang-15
CFLAGS=-flto=thin --sysroot=/sysroot
__0
- name: Log versions
Expand All @@ -293,7 +293,7 @@ jobs:
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '34-cargo-home-${{ matrix.os }}-${{ hashFiles(''Cargo.lock'') }}'
key: '35-cargo-home-${{ matrix.os }}-${{ hashFiles(''Cargo.lock'') }}'
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr)'
- name: Restore cache build output (PR)
uses: actions/cache/restore@v3
Expand All @@ -305,7 +305,7 @@ jobs:
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: '34-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-'
restore-keys: '35-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-'
- name: Apply and update mtime cache
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (!startsWith(github.ref, ''refs/tags/''))'
uses: ./.github/mtime_cache
Expand Down Expand Up @@ -589,7 +589,7 @@ jobs:
!./target/*/gn_out
!./target/*/*.zip
!./target/*/*.tar.gz
key: '34-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}'
key: '35-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}'
publish-canary:
name: publish canary
runs-on: ubuntu-22.04
Expand Down
9 changes: 5 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ext/ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ path = "lib.rs"
deno_core.workspace = true
dlopen.workspace = true
dynasmrt = "1.2.3"
libffi = "3.2.0"
libffi = "=3.1.0"
libffi-sys = "=2.1.0" # temporary pin for downgrade to Rust 1.69
serde.workspace = true
serde-value = "0.7"
serde_json = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.70.0"
channel = "1.69.0"
components = ["rustfmt", "clippy"]

0 comments on commit 7e91f74

Please sign in to comment.