mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-31 19:05:00 +07:00
livekit: Use our build of libwebrtc.a (#51433)
Closes #51339 This should address issues with too new libstdc++.so on older/more conservative distros such as RHEL9. Release Notes: - Relaxed requirement for libstdc++.so available on Linux distros.
This commit is contained in:
parent
ec2ab12a06
commit
be4d38a56e
17 changed files with 31 additions and 71 deletions
|
|
@ -15,14 +15,4 @@ rustflags = ["-D", "warnings"]
|
|||
[profile.dev]
|
||||
debug = "limited"
|
||||
|
||||
# Use Mold on Linux, because it's faster than GNU ld and LLD.
|
||||
#
|
||||
# We no longer set this in the default `config.toml` so that developers can opt in to Wild, which
|
||||
# is faster than Mold, in their own ~/.cargo/config.toml.
|
||||
[target.x86_64-unknown-linux-gnu]
|
||||
linker = "clang"
|
||||
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
|
||||
|
||||
[target.aarch64-unknown-linux-gnu]
|
||||
linker = "clang"
|
||||
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
|
||||
|
|
|
|||
|
|
@ -16,5 +16,9 @@ rustflags = [
|
|||
"target-feature=+crt-static", # This fixes the linking issue when compiling livekit on Windows
|
||||
]
|
||||
|
||||
# We need lld to link libwebrtc.a successfully on aarch64-linux
|
||||
[target.aarch64-unknown-linux-gnu]
|
||||
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
|
||||
|
||||
[env]
|
||||
MACOSX_DEPLOYMENT_TARGET = "10.15.7"
|
||||
|
|
|
|||
2
.github/workflows/autofix_pr.yml
vendored
2
.github/workflows/autofix_pr.yml
vendored
|
|
@ -37,8 +37,6 @@ jobs:
|
|||
path: ~/.rustup
|
||||
- name: steps::setup_linux
|
||||
run: ./script/linux
|
||||
- name: steps::install_mold
|
||||
run: ./script/install-mold
|
||||
- name: steps::download_wasi_sdk
|
||||
run: ./script/download-wasi-sdk
|
||||
- name: steps::setup_pnpm
|
||||
|
|
|
|||
2
.github/workflows/compare_perf.yml
vendored
2
.github/workflows/compare_perf.yml
vendored
|
|
@ -30,8 +30,6 @@ jobs:
|
|||
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
|
||||
- name: steps::setup_linux
|
||||
run: ./script/linux
|
||||
- name: steps::install_mold
|
||||
run: ./script/install-mold
|
||||
- name: steps::download_wasi_sdk
|
||||
run: ./script/download-wasi-sdk
|
||||
- name: compare_perf::run_perf::install_hyperfine
|
||||
|
|
|
|||
4
.github/workflows/deploy_collab.yml
vendored
4
.github/workflows/deploy_collab.yml
vendored
|
|
@ -32,8 +32,6 @@ jobs:
|
|||
path: ~/.rustup
|
||||
- name: steps::setup_linux
|
||||
run: ./script/linux
|
||||
- name: steps::install_mold
|
||||
run: ./script/install-mold
|
||||
- name: steps::download_wasi_sdk
|
||||
run: ./script/download-wasi-sdk
|
||||
- name: steps::cargo_fmt
|
||||
|
|
@ -65,8 +63,6 @@ jobs:
|
|||
path: ~/.rustup
|
||||
- name: steps::setup_linux
|
||||
run: ./script/linux
|
||||
- name: steps::install_mold
|
||||
run: ./script/install-mold
|
||||
- name: steps::download_wasi_sdk
|
||||
run: ./script/download-wasi-sdk
|
||||
- name: steps::cargo_install_nextest
|
||||
|
|
|
|||
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
|
|
@ -72,8 +72,6 @@ jobs:
|
|||
path: ~/.rustup
|
||||
- name: steps::setup_linux
|
||||
run: ./script/linux
|
||||
- name: steps::install_mold
|
||||
run: ./script/install-mold
|
||||
- name: steps::download_wasi_sdk
|
||||
run: ./script/download-wasi-sdk
|
||||
- name: steps::setup_node
|
||||
|
|
@ -199,8 +197,6 @@ jobs:
|
|||
path: ~/.rustup
|
||||
- name: steps::setup_linux
|
||||
run: ./script/linux
|
||||
- name: steps::install_mold
|
||||
run: ./script/install-mold
|
||||
- name: steps::download_wasi_sdk
|
||||
run: ./script/download-wasi-sdk
|
||||
- name: steps::setup_sccache
|
||||
|
|
@ -318,8 +314,6 @@ jobs:
|
|||
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
- name: steps::setup_linux
|
||||
run: ./script/linux
|
||||
- name: steps::install_mold
|
||||
run: ./script/install-mold
|
||||
- name: steps::download_wasi_sdk
|
||||
run: ./script/download-wasi-sdk
|
||||
- name: ./script/bundle-linux
|
||||
|
|
@ -360,8 +354,6 @@ jobs:
|
|||
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
- name: steps::setup_linux
|
||||
run: ./script/linux
|
||||
- name: steps::install_mold
|
||||
run: ./script/install-mold
|
||||
- name: steps::download_wasi_sdk
|
||||
run: ./script/download-wasi-sdk
|
||||
- name: ./script/bundle-linux
|
||||
|
|
|
|||
4
.github/workflows/release_nightly.yml
vendored
4
.github/workflows/release_nightly.yml
vendored
|
|
@ -122,8 +122,6 @@ jobs:
|
|||
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
- name: steps::setup_linux
|
||||
run: ./script/linux
|
||||
- name: steps::install_mold
|
||||
run: ./script/install-mold
|
||||
- name: steps::download_wasi_sdk
|
||||
run: ./script/download-wasi-sdk
|
||||
- name: ./script/bundle-linux
|
||||
|
|
@ -170,8 +168,6 @@ jobs:
|
|||
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
- name: steps::setup_linux
|
||||
run: ./script/linux
|
||||
- name: steps::install_mold
|
||||
run: ./script/install-mold
|
||||
- name: steps::download_wasi_sdk
|
||||
run: ./script/download-wasi-sdk
|
||||
- name: ./script/bundle-linux
|
||||
|
|
|
|||
2
.github/workflows/run_agent_evals.yml
vendored
2
.github/workflows/run_agent_evals.yml
vendored
|
|
@ -34,8 +34,6 @@ jobs:
|
|||
path: ~/.rustup
|
||||
- name: steps::setup_linux
|
||||
run: ./script/linux
|
||||
- name: steps::install_mold
|
||||
run: ./script/install-mold
|
||||
- name: steps::download_wasi_sdk
|
||||
run: ./script/download-wasi-sdk
|
||||
- name: steps::setup_cargo_config
|
||||
|
|
|
|||
4
.github/workflows/run_bundling.yml
vendored
4
.github/workflows/run_bundling.yml
vendored
|
|
@ -32,8 +32,6 @@ jobs:
|
|||
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
- name: steps::setup_linux
|
||||
run: ./script/linux
|
||||
- name: steps::install_mold
|
||||
run: ./script/install-mold
|
||||
- name: steps::download_wasi_sdk
|
||||
run: ./script/download-wasi-sdk
|
||||
- name: ./script/bundle-linux
|
||||
|
|
@ -73,8 +71,6 @@ jobs:
|
|||
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
- name: steps::setup_linux
|
||||
run: ./script/linux
|
||||
- name: steps::install_mold
|
||||
run: ./script/install-mold
|
||||
- name: steps::download_wasi_sdk
|
||||
run: ./script/download-wasi-sdk
|
||||
- name: ./script/bundle-linux
|
||||
|
|
|
|||
2
.github/workflows/run_cron_unit_evals.yml
vendored
2
.github/workflows/run_cron_unit_evals.yml
vendored
|
|
@ -35,8 +35,6 @@ jobs:
|
|||
path: ~/.rustup
|
||||
- name: steps::setup_linux
|
||||
run: ./script/linux
|
||||
- name: steps::install_mold
|
||||
run: ./script/install-mold
|
||||
- name: steps::download_wasi_sdk
|
||||
run: ./script/download-wasi-sdk
|
||||
- name: steps::cargo_install_nextest
|
||||
|
|
|
|||
10
.github/workflows/run_tests.yml
vendored
10
.github/workflows/run_tests.yml
vendored
|
|
@ -218,8 +218,6 @@ jobs:
|
|||
path: ~/.rustup
|
||||
- name: steps::setup_linux
|
||||
run: ./script/linux
|
||||
- name: steps::install_mold
|
||||
run: ./script/install-mold
|
||||
- name: steps::download_wasi_sdk
|
||||
run: ./script/download-wasi-sdk
|
||||
- name: steps::setup_sccache
|
||||
|
|
@ -331,8 +329,6 @@ jobs:
|
|||
path: ~/.rustup
|
||||
- name: steps::setup_linux
|
||||
run: ./script/linux
|
||||
- name: steps::install_mold
|
||||
run: ./script/install-mold
|
||||
- name: steps::download_wasi_sdk
|
||||
run: ./script/download-wasi-sdk
|
||||
- name: steps::setup_node
|
||||
|
|
@ -430,8 +426,6 @@ jobs:
|
|||
path: ~/.rustup
|
||||
- name: steps::setup_linux
|
||||
run: ./script/linux
|
||||
- name: steps::install_mold
|
||||
run: ./script/install-mold
|
||||
- name: steps::download_wasi_sdk
|
||||
run: ./script/download-wasi-sdk
|
||||
- name: steps::setup_cargo_config
|
||||
|
|
@ -480,8 +474,6 @@ jobs:
|
|||
path: ~/.rustup
|
||||
- name: steps::setup_linux
|
||||
run: ./script/linux
|
||||
- name: steps::install_mold
|
||||
run: ./script/install-mold
|
||||
- name: steps::download_wasi_sdk
|
||||
run: ./script/download-wasi-sdk
|
||||
- name: steps::setup_sccache
|
||||
|
|
@ -606,8 +598,6 @@ jobs:
|
|||
jobSummary: false
|
||||
- name: steps::setup_linux
|
||||
run: ./script/linux
|
||||
- name: steps::install_mold
|
||||
run: ./script/install-mold
|
||||
- name: steps::download_wasi_sdk
|
||||
run: ./script/download-wasi-sdk
|
||||
- name: ./script/generate-action-metadata
|
||||
|
|
|
|||
2
.github/workflows/run_unit_evals.yml
vendored
2
.github/workflows/run_unit_evals.yml
vendored
|
|
@ -38,8 +38,6 @@ jobs:
|
|||
path: ~/.rustup
|
||||
- name: steps::setup_linux
|
||||
run: ./script/linux
|
||||
- name: steps::install_mold
|
||||
run: ./script/install-mold
|
||||
- name: steps::download_wasi_sdk
|
||||
run: ./script/download-wasi-sdk
|
||||
- name: steps::cargo_install_nextest
|
||||
|
|
|
|||
14
Cargo.lock
generated
14
Cargo.lock
generated
|
|
@ -9758,7 +9758,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "libwebrtc"
|
||||
version = "0.3.26"
|
||||
source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=37835f840d0070d45ac8b31cce6a6ae7aca3f459#37835f840d0070d45ac8b31cce6a6ae7aca3f459"
|
||||
source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=cf4375b244ebb51702968df7fc36e192d0f45ad5#cf4375b244ebb51702968df7fc36e192d0f45ad5"
|
||||
dependencies = [
|
||||
"cxx",
|
||||
"glib",
|
||||
|
|
@ -9856,7 +9856,7 @@ checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092"
|
|||
[[package]]
|
||||
name = "livekit"
|
||||
version = "0.7.32"
|
||||
source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=37835f840d0070d45ac8b31cce6a6ae7aca3f459#37835f840d0070d45ac8b31cce6a6ae7aca3f459"
|
||||
source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=cf4375b244ebb51702968df7fc36e192d0f45ad5#cf4375b244ebb51702968df7fc36e192d0f45ad5"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"bmrng",
|
||||
|
|
@ -9882,7 +9882,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "livekit-api"
|
||||
version = "0.4.14"
|
||||
source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=37835f840d0070d45ac8b31cce6a6ae7aca3f459#37835f840d0070d45ac8b31cce6a6ae7aca3f459"
|
||||
source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=cf4375b244ebb51702968df7fc36e192d0f45ad5#cf4375b244ebb51702968df7fc36e192d0f45ad5"
|
||||
dependencies = [
|
||||
"base64 0.21.7",
|
||||
"futures-util",
|
||||
|
|
@ -9909,7 +9909,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "livekit-protocol"
|
||||
version = "0.7.1"
|
||||
source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=37835f840d0070d45ac8b31cce6a6ae7aca3f459#37835f840d0070d45ac8b31cce6a6ae7aca3f459"
|
||||
source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=cf4375b244ebb51702968df7fc36e192d0f45ad5#cf4375b244ebb51702968df7fc36e192d0f45ad5"
|
||||
dependencies = [
|
||||
"futures-util",
|
||||
"livekit-runtime",
|
||||
|
|
@ -9925,7 +9925,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "livekit-runtime"
|
||||
version = "0.4.0"
|
||||
source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=37835f840d0070d45ac8b31cce6a6ae7aca3f459#37835f840d0070d45ac8b31cce6a6ae7aca3f459"
|
||||
source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=cf4375b244ebb51702968df7fc36e192d0f45ad5#cf4375b244ebb51702968df7fc36e192d0f45ad5"
|
||||
dependencies = [
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
|
|
@ -19953,7 +19953,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "webrtc-sys"
|
||||
version = "0.3.23"
|
||||
source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=37835f840d0070d45ac8b31cce6a6ae7aca3f459#37835f840d0070d45ac8b31cce6a6ae7aca3f459"
|
||||
source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=cf4375b244ebb51702968df7fc36e192d0f45ad5#cf4375b244ebb51702968df7fc36e192d0f45ad5"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"cxx",
|
||||
|
|
@ -19967,7 +19967,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "webrtc-sys-build"
|
||||
version = "0.3.13"
|
||||
source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=37835f840d0070d45ac8b31cce6a6ae7aca3f459#37835f840d0070d45ac8b31cce6a6ae7aca3f459"
|
||||
source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=cf4375b244ebb51702968df7fc36e192d0f45ad5#cf4375b244ebb51702968df7fc36e192d0f45ad5"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"fs2",
|
||||
|
|
|
|||
|
|
@ -845,8 +845,8 @@ notify = { git = "https://github.com/zed-industries/notify.git", rev = "ce58c24c
|
|||
notify-types = { git = "https://github.com/zed-industries/notify.git", rev = "ce58c24cad542c28e04ced02e20325a4ec28a31d" }
|
||||
windows-capture = { git = "https://github.com/zed-industries/windows-capture.git", rev = "f0d6c1b6691db75461b732f6d5ff56eed002eeb9" }
|
||||
calloop = { git = "https://github.com/zed-industries/calloop" }
|
||||
livekit = { git = "https://github.com/zed-industries/livekit-rust-sdks", rev = "37835f840d0070d45ac8b31cce6a6ae7aca3f459" }
|
||||
libwebrtc = { git = "https://github.com/zed-industries/livekit-rust-sdks", rev = "37835f840d0070d45ac8b31cce6a6ae7aca3f459" }
|
||||
livekit = { git = "https://github.com/zed-industries/livekit-rust-sdks", rev = "cf4375b244ebb51702968df7fc36e192d0f45ad5" }
|
||||
libwebrtc = { git = "https://github.com/zed-industries/livekit-rust-sdks", rev = "cf4375b244ebb51702968df7fc36e192d0f45ad5" }
|
||||
|
||||
[profile.dev]
|
||||
split-debuginfo = "unpacked"
|
||||
|
|
|
|||
|
|
@ -74,7 +74,15 @@ fi
|
|||
export CC=${CC:-$(which clang)}
|
||||
|
||||
# Build binary in release mode
|
||||
export RUSTFLAGS="${RUSTFLAGS:-} -C link-args=-Wl,--disable-new-dtags,-rpath,\$ORIGIN/../lib"
|
||||
# We need lld to link libwebrtc.a successfully on aarch64-linux.
|
||||
# NOTE: Since RUSTFLAGS env var overrides all .cargo/config.toml rustflags
|
||||
# (see https://github.com/rust-lang/cargo/issues/5376), the
|
||||
# [target.aarch64-unknown-linux-gnu] section in config.toml has no effect here.
|
||||
if [[ "$(uname -m)" == "aarch64" ]]; then
|
||||
export RUSTFLAGS="${RUSTFLAGS:-} -C link-arg=-fuse-ld=lld -C link-args=-Wl,--disable-new-dtags,-rpath,\$ORIGIN/../lib"
|
||||
else
|
||||
export RUSTFLAGS="${RUSTFLAGS:-} -C link-args=-Wl,--disable-new-dtags,-rpath,\$ORIGIN/../lib"
|
||||
fi
|
||||
cargo build --release --target "${target_triple}" --package zed --package cli
|
||||
# Build remote_server in separate invocation to prevent feature unification from other crates
|
||||
# from influencing dynamic libraries required by it.
|
||||
|
|
@ -111,10 +119,12 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
# Strip debug symbols and save them for upload to DigitalOcean
|
||||
objcopy --strip-debug "${target_dir}/${target_triple}/release/zed"
|
||||
objcopy --strip-debug "${target_dir}/${target_triple}/release/cli"
|
||||
objcopy --strip-debug "${target_dir}/${remote_server_triple}/release/remote_server"
|
||||
# Strip debug symbols and save them for upload to DigitalOcean.
|
||||
# We use llvm-objcopy because GNU objcopy on older distros (e.g. Ubuntu 20.04)
|
||||
# doesn't understand CREL sections produced by newer LLVM.
|
||||
llvm-objcopy --strip-debug "${target_dir}/${target_triple}/release/zed"
|
||||
llvm-objcopy --strip-debug "${target_dir}/${target_triple}/release/cli"
|
||||
llvm-objcopy --strip-debug "${target_dir}/${remote_server_triple}/release/remote_server"
|
||||
|
||||
# Ensure that remote_server does not depend on libssl nor libcrypto, as we got rid of these deps.
|
||||
if ldd "${target_dir}/${remote_server_triple}/release/remote_server" | grep -q 'libcrypto\|libssl'; then
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ if [[ -n $apt ]]; then
|
|||
make
|
||||
cmake
|
||||
clang
|
||||
lld
|
||||
llvm
|
||||
jq
|
||||
git
|
||||
curl
|
||||
|
|
|
|||
|
|
@ -262,18 +262,12 @@ pub fn setup_linux() -> Step<Run> {
|
|||
named::bash("./script/linux")
|
||||
}
|
||||
|
||||
fn install_mold() -> Step<Run> {
|
||||
named::bash("./script/install-mold")
|
||||
}
|
||||
|
||||
fn download_wasi_sdk() -> Step<Run> {
|
||||
named::bash("./script/download-wasi-sdk")
|
||||
}
|
||||
|
||||
pub(crate) fn install_linux_dependencies(job: Job) -> Job {
|
||||
job.add_step(setup_linux())
|
||||
.add_step(install_mold())
|
||||
.add_step(download_wasi_sdk())
|
||||
job.add_step(setup_linux()).add_step(download_wasi_sdk())
|
||||
}
|
||||
|
||||
pub fn script(name: &str) -> Step<Run> {
|
||||
|
|
|
|||
Loading…
Reference in a new issue