Improve static linking configuration in build workflow
Some checks failed
Build / build (push) Failing after 3m8s
Some checks failed
Build / build (push) Failing after 3m8s
- Modify CMake linker and compiler flags for better static linking - Add step to install static library dependencies - Adjust static compilation flags to support cross-compilation
This commit is contained in:
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@@ -48,11 +48,16 @@ jobs:
|
|||||||
CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release \
|
CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release \
|
||||||
-DUSE_CLANG=ON \
|
-DUSE_CLANG=ON \
|
||||||
-DBUILD_STATIC=ON \
|
-DBUILD_STATIC=ON \
|
||||||
-DCMAKE_EXE_LINKER_FLAGS="-static -static-libgcc -static-libstdc++" \
|
-DCMAKE_EXE_LINKER_FLAGS="-static" \
|
||||||
-DCMAKE_FIND_LIBRARY_SUFFIXES=".a" \
|
-DCMAKE_FIND_LIBRARY_SUFFIXES=".a" \
|
||||||
-DCMAKE_EXE_LINKER_FLAGS_INIT="-static" \
|
-DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++" \
|
||||||
|
-DCMAKE_C_FLAGS="-static-libgcc" \
|
||||||
..
|
..
|
||||||
|
|
||||||
|
- name: Install Static Libraries
|
||||||
|
run: |
|
||||||
|
sudo apt-get install -y libstdc++-11-dev-amd64-cross
|
||||||
|
|
||||||
- name: Build the project
|
- name: Build the project
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
|
Reference in New Issue
Block a user