Skip to content

Commit 453ad0d

Browse files
committed
Fix static builds
1 parent 36a7009 commit 453ad0d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Diff for: .github/workflows/build.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,7 @@ jobs:
9595
export CXX=g++-12
9696
if [ "${{ matrix.STATIC }}" -eq "1" ]; then
9797
cmake -DHAVE_SANITIZER=1 -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -DHAVE_TESTS=1 \
98-
-DBUILD_SHARED_LIBS=OFF \
99-
-DCMAKE_EXE_LINKER_FLAGS="-static -static-libgcc \
100-
-static-libstdc++" -DCMAKE_FIND_LIBRARY_SUFFIXES=".a" \
98+
-DFORCE_STATIC_DEPS=1 \
10199
-DENABLE_WERROR=1 -DHAVE_${{ matrix.SIMD }}=1 -DHAVE_MPI=${{ matrix.MPI }} ..
102100
else
103101
cmake -DHAVE_SANITIZER=1 -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -DHAVE_TESTS=1 \
@@ -156,9 +154,7 @@ jobs:
156154
mkdir build && cd build
157155
CC=${{ matrix.CPREF }}-linux-gnu-gcc-12 CXX=${{ matrix.CPREF }}-linux-gnu-g++-12 \
158156
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHAVE_TESTS=1 \
159-
-DBUILD_SHARED_LIBS=OFF \
160-
-DCMAKE_EXE_LINKER_FLAGS="-static -static-libgcc -static-libstdc++" \
161-
-DCMAKE_FIND_LIBRARY_SUFFIXES=".a" \
157+
-DFORCE_STATIC_DEPS=1 \
162158
-DRust_CARGO_TARGET=${{ matrix.CPREF }}-unknown-linux-gnu \
163159
-DENABLE_WERROR=1 -DHAVE_${{ matrix.SIMD }}=1 ..
164160
make -j $(nproc --all)

0 commit comments

Comments
 (0)