Enhance static library support in build workflow
Some checks failed
Build / build (push) Failing after 8s
Some checks failed
Build / build (push) Failing after 8s
- Install static library development packages - Update CMake linker flags to improve static linking - Remove redundant library installation step - Refine static compilation configuration
This commit is contained in:
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -25,6 +25,8 @@ jobs:
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y build-essential cmake clang checkinstall zlib1g-dev musl-tools
|
||||
# Install static versions of libraries
|
||||
sudo apt-get install -y libstdc++-11-dev libgcc-11-dev libc6-dev
|
||||
|
||||
- name: Build Static Abseil
|
||||
run: |
|
||||
@@ -48,16 +50,12 @@ jobs:
|
||||
CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DUSE_CLANG=ON \
|
||||
-DBUILD_STATIC=ON \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-static" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-static -static-libgcc -static-libstdc++" \
|
||||
-DCMAKE_FIND_LIBRARY_SUFFIXES=".a" \
|
||||
-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
|
||||
run: |
|
||||
cd build
|
||||
|
1
abseil-cpp
Submodule
1
abseil-cpp
Submodule
Submodule abseil-cpp added at 20a1220136
Reference in New Issue
Block a user