Skip to content

Commit 914adda

Browse files
committed
fix(ci): set CXX for musl targets so z3 bundled cmake can find a C++ compiler
musl-tools only provides musl-gcc (C compiler wrapper), not musl-g++. The z3 bundled cmake build needs a C++ compiler to compile z3 from source. Use the system g++ since z3 exposes a C-linkage API and libstdc++ is statically linked in the final musl binary.
1 parent 57fffa0 commit 914adda

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.github/workflows/release-dev.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,12 @@ jobs:
220220
sed -i -E '/^\[workspace\.package\]/,/^\[/{s/^version[[:space:]]*=[[:space:]]*".*"/version = "'"${{ needs.compute-versions.outputs.cargo_version }}"'"/}' Cargo.toml
221221
222222
- name: Build ${{ matrix.target }}
223+
env:
224+
# musl-tools only provides musl-gcc (C); z3 bundled build needs a
225+
# C++ compiler. The system g++ works because z3's public API uses
226+
# C linkage and libstdc++ is statically linked in the final binary.
227+
CXX_aarch64_unknown_linux_musl: g++
228+
CXX_x86_64_unknown_linux_musl: g++
223229
run: mise x -- cargo build --release --target ${{ matrix.target }} -p openshell-cli --features bundled-z3
224230

225231
- name: sccache stats

.github/workflows/release-tag.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@ jobs:
242242
sed -i -E '/^\[workspace\.package\]/,/^\[/{s/^version[[:space:]]*=[[:space:]]*".*"/version = "'"${{ needs.compute-versions.outputs.cargo_version }}"'"/}' Cargo.toml
243243
244244
- name: Build ${{ matrix.target }}
245+
env:
246+
CXX_aarch64_unknown_linux_musl: g++
247+
CXX_x86_64_unknown_linux_musl: g++
245248
run: mise x -- cargo build --release --target ${{ matrix.target }} -p openshell-cli --features bundled-z3
246249

247250
- name: sccache stats

0 commit comments

Comments
 (0)