Skip to content

Commit 1580e65

Browse files
committed
ci: produce statically linked build on MSYS2
Not just the C++ standard library but all libraries are now statically linked. Due to the inclusion of Boost Process the partially statically linked build included standard libraries, because the Boost library is dynamically linked by default.
1 parent 677c349 commit 1580e65

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/msys2.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,17 @@ jobs:
5454
# export MSYSTEM=$(echo ${{matrix.msystem}} | tr '[:lower:]' '[:upper:]')
5555
# cd "$GITHUB_WORKSPACE"/build
5656
# ctest -V
57-
- name: Build with statically linked standard libraries
57+
- name: Build statically linked executable
5858
run: |
5959
export MSYSTEM=$(echo ${{matrix.msystem}} | tr '[:lower:]' '[:upper:]')
6060
export CXX=g++
6161
export CC=gcc
6262
cd "$GITHUB_WORKSPACE"
63-
mkdir build_static_std_libs
64-
cd build_static_std_libs
65-
cmake ../ -DENABLE_LTO=ON -DENABLE_STATIC_STANDARD_LIBRARIES=ON
63+
mkdir build-static
64+
cd build-static
65+
cmake ../ -DENABLE_LTO=ON -DENABLE_STATIC_LINKING=ON
6666
cmake --build . -j4
67-
# - name: Tests of build with statically linked standard libraries
67+
# - name: Tests of build with statically linked build
6868
# run: |
6969
# export MSYSTEM=$(echo ${{matrix.msystem}} | tr '[:lower:]' '[:upper:]')
7070
# cd "$GITHUB_WORKSPACE"/build_static_std_libs
@@ -75,7 +75,7 @@ jobs:
7575
cd "$GITHUB_WORKSPACE"
7676
mkdir artifacts
7777
# binary files
78-
./ci/copy-dll-dependencies.sh build_static_std_libs/code/pmdb.exe artifacts/
78+
./ci/copy-dll-dependencies.sh build-static/code/pmdb.exe artifacts/
7979
# license + third-party notices
8080
cp LICENSE artifacts/
8181
cp third-party.md artifacts/

0 commit comments

Comments
 (0)