Skip to content

Commit ef6035e

Browse files
committed
fix build with vendored mimalloc and boringssl
1 parent a566b8e commit ef6035e

3 files changed

Lines changed: 35 additions & 32 deletions

File tree

.github/workflows/static.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ env:
2525

2626
jobs:
2727
musl-gcc:
28-
name: musl-c
28+
name: musl-gcc
2929
runs-on: ubuntu-latest
3030
strategy:
3131
matrix:
@@ -48,19 +48,24 @@ jobs:
4848
sudo apt-get install capnproto musl-tools
4949
- name: Cargo build
5050
run: cargo build --target=x86_64-unknown-linux-musl --no-default-features --features secure-vendored-mimalloc,${{ matrix.feature }},quic,vendored-c-ares
51-
musl-gxx:
52-
name: musl-g++
51+
musl-clang:
52+
name: musl-clang
5353
runs-on: ubuntu-latest
5454
container:
5555
image: ghcr.io/rust-lang/rust:nightly-alpine
5656
env:
5757
CARGO_TERM_COLOR: always
58-
RUSTFLAGS: -C target-feature=+crt-static
58+
RUSTFLAGS: -Ctarget-feature=+crt-static -Clinker=clang -Clink-arg=-fuse-ld=lld
5959
UNSTABLE_OPTIONS: -Ztarget-applies-to-host -Zhost-config
60+
CC: clang
61+
CXX: clang++
62+
CXXSTDLIB: c++
6063
strategy:
6164
matrix:
6265
feature:
63-
- vendored-boringssl,rustls-ring
66+
# aws-lc won't link with a c++ runtime library
67+
- vendored-aws-lc,rustls-aws-lc
68+
- vendored-aws-lc-fips,rustls-aws-lc-fips
6469
steps:
6570
- name: Install base tools
6671
run: |
@@ -71,20 +76,22 @@ jobs:
7176
submodules: true
7277
- name: Install dependencies
7378
run: |
74-
apk add --no-cache musl-dev linux-headers libunwind-static
75-
apk add --no-cache g++ capnproto-dev cmake make
76-
apk add --no-cache perl nasm
77-
apk add --no-cache libstdc++-dev clang-libclang
79+
apk add --no-cache musl-dev linux-headers libc++-dev libunwind-static
80+
apk add --no-cache clang lld capnproto-dev clang-libclang cmake make
81+
- name: Install Go for AWS-LC-FIPS
82+
if: contains(matrix.feature, 'vendored-aws-lc-fips')
83+
run: apk add --no-cache go perl nasm
7884
- name: Cargo build
7985
run: cargo $UNSTABLE_OPTIONS build --no-default-features --features secure-vendored-mimalloc,${{ matrix.feature }},quic,vendored-c-ares
8086
musl-clang-libcxx:
81-
name: musl-clang-libcxx
87+
name: musl-clang-libc++
8288
runs-on: ubuntu-latest
8389
container:
8490
image: ghcr.io/rust-lang/rust:nightly-alpine
8591
env:
8692
CARGO_TERM_COLOR: always
87-
RUSTFLAGS: -C target-feature=+crt-static
93+
# The c++abi lib is needed when build boringssl in cmake Debug mode. Enable it when build with debug profile
94+
RUSTFLAGS: -Ctarget-feature=+crt-static -Clinker=clang -Clink-arg=-fuse-ld=lld # -Clink-arg=-lc++abi
8895
UNSTABLE_OPTIONS: -Ztarget-applies-to-host -Zhost-config
8996
CC: clang
9097
CXX: clang++
@@ -93,8 +100,7 @@ jobs:
93100
strategy:
94101
matrix:
95102
feature:
96-
- vendored-aws-lc,rustls-aws-lc
97-
- vendored-aws-lc-fips,rustls-aws-lc-fips
103+
- vendored-boringssl,rustls-ring
98104
steps:
99105
- name: Install base tools
100106
run: |
@@ -106,12 +112,9 @@ jobs:
106112
- name: Install dependencies
107113
run: |
108114
apk add --no-cache musl-dev linux-headers libc++-dev libc++-static libunwind-static
109-
apk add --no-cache clang capnproto-dev clang-libclang cmake make
110-
- name: Install Go for AWS-LC-FIPS
111-
if: contains(matrix.feature, 'vendored-aws-lc-fips')
112-
run: apk add --no-cache go perl nasm
115+
apk add --no-cache clang lld capnproto-dev clang-libclang cmake make
113116
- name: Cargo build
114-
run: cargo $UNSTABLE_OPTIONS build --no-default-features --features secure-vendored-mimalloc,${{ matrix.feature }},quic,vendored-c-ares
117+
run: cargo $UNSTABLE_OPTIONS build --profile release --no-default-features --features secure-vendored-mimalloc,${{ matrix.feature }},quic,vendored-c-ares
115118
msvc-vcpkg:
116119
name: msvc-vcpkg
117120
runs-on: windows-latest

Cargo.lock

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ tokio-rustls = { version = "0.26", default-features = false, features = ["tls12"
168168
quinn = { version = "0.11", default-features = false, features = ["runtime-tokio"] }
169169
quinn-udp = { version = "0.5.9", default-features = false, features = ["fast-apple-datapath"] }
170170
#
171-
openssl = { package = "variant-ssl", version = "0.17.11" }
172-
openssl-sys = { package = "variant-ssl-sys", version = "0.17.11" }
171+
openssl = { package = "variant-ssl", version = "0.17.30" }
172+
openssl-sys = { package = "variant-ssl-sys", version = "0.17.30" }
173173
openssl-probe = "0.2"
174174
#
175175
kanal = { version = "0.1.1", default-features = false }

0 commit comments

Comments
 (0)