1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

chore: Ensure we only end up with the clang version we want & upgrade libffi (#19421)

The number of clang versions installed on the build machines is too dang
high.
This commit is contained in:
Matt Mastracci 2023-06-08 09:16:24 -06:00 committed by GitHub
parent caad79ef78
commit f35161d3c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 8 deletions

View file

@ -24,12 +24,14 @@ const prCacheKeyPrefix =
`${cacheVersion}-cargo-target-\${{ matrix.os }}-\${{ matrix.profile }}-\${{ matrix.job }}-`;
const installPkgsCommand =
"sudo apt-get install --no-install-recommends debootstrap clang-15 lld-15";
"sudo apt-get install --no-install-recommends debootstrap clang-15 lld-15 clang-tools-15 clang-format-15 clang-tidy-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
# Remove older clang before we install
sudo apt-get remove 'clang-12*' 'clang-13*' 'clang-14*' 'llvm-12*' 'llvm-13*' 'llvm-14*' 'lld-12*' 'lld-13*' 'lld-14*'
# Install clang-15, lld-15, and debootstrap.
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" |
@ -40,6 +42,8 @@ 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
${installPkgsCommand} || echo 'Failed. Trying again.' && sudo apt-get clean && sudo apt-get update && ${installPkgsCommand}
# Fix alternatives
(yes '' | sudo update-alternatives --force --all) || true
# Create ubuntu-16.04 sysroot environment, which is used to avoid
# depending on a very recent version of glibc.
@ -461,6 +465,7 @@ const ci = {
"python --version",
"rustc --version",
"cargo --version",
"which dpkg && dpkg -l",
// Deno is installed when linting.
'if [ "${{ matrix.job }}" == "lint" ]',
"then",

View file

@ -209,6 +209,8 @@ jobs:
# Avoid running man-db triggers, which sometimes takes several minutes
# to complete.
sudo apt-get remove --purge -y man-db
# Remove older clang before we install
sudo apt-get remove 'clang-12*' 'clang-13*' 'clang-14*' 'llvm-12*' 'llvm-13*' 'llvm-14*' 'lld-12*' 'lld-13*' 'lld-14*'
# Install clang-15, lld-15, and debootstrap.
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" |
@ -218,7 +220,9 @@ jobs:
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-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
sudo apt-get install --no-install-recommends debootstrap clang-15 lld-15 clang-tools-15 clang-format-15 clang-tidy-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 clang-tools-15 clang-format-15 clang-tidy-15
# Fix alternatives
(yes '' | sudo update-alternatives --force --all) || true
# Create ubuntu-16.04 sysroot environment, which is used to avoid
# depending on a very recent version of glibc.
@ -277,6 +281,7 @@ jobs:
python --version
rustc --version
cargo --version
which dpkg && dpkg -l
if [ "${{ matrix.job }}" == "lint" ]
then
deno --version

8
Cargo.lock generated
View file

@ -2789,9 +2789,9 @@ checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
[[package]]
name = "libffi"
version = "3.1.0"
version = "3.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6cb06d5b4c428f3cd682943741c39ed4157ae989fffe1094a08eaf7c4014cf60"
checksum = "ce826c243048e3d5cec441799724de52e2d42f820468431fc3fceee2341871e2"
dependencies = [
"libc",
"libffi-sys",
@ -2799,9 +2799,9 @@ dependencies = [
[[package]]
name = "libffi-sys"
version = "2.1.0"
version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11c6f11e063a27ffe040a9d15f0b661bf41edc2383b7ae0e0ad5a7e7d53d9da3"
checksum = "dc65067b78c0fc069771e8b9a9e02df71e08858bec92c1f101377c67b9dca7c7"
dependencies = [
"cc",
]

View file

@ -17,8 +17,8 @@ path = "lib.rs"
deno_core.workspace = true
dlopen.workspace = true
dynasmrt = "1.2.3"
libffi = "=3.1.0"
libffi-sys = "=2.1.0" # temporary pin for downgrade to Rust 1.69
libffi = "=3.2.0"
libffi-sys = "=2.2.1"
serde.workspace = true
serde-value = "0.7"
serde_json = "1.0"