Skip to content

Commit

Permalink
Upgrade gcc to minimal available versions
Browse files Browse the repository at this point in the history
Signed-off-by: Tao He <sighingnow@gmail.com>
  • Loading branch information
sighingnow committed Jul 15, 2023
1 parent c8ea8ae commit d0dd8d1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/libclang-linux-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ jobs:
sudo apt-get update
sudo apt-get install -y \
binutils-aarch64-linux-gnu \
g++-7-aarch64-linux-gnu \
gcc-7-aarch64-linux-gnu \
gcc-8 \
g++-8 \
gcc-8-aarch64-linux-gnu \
g++-8-aarch64-linux-gnu
- name: build host llvmtblgen/clangtblgen
run: |
mkdir llvm-project-$LLVM_VER/build-host
Expand All @@ -49,8 +51,8 @@ jobs:
-DLLVM_TARGETS_TO_BUILD=X86 \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O2 -g -DNDEBUG -static-libgcc -static-libstdc++" \
-DCMAKE_C_COMPILER=gcc-7 \
-DCMAKE_CXX_COMPILER=g++-7
-DCMAKE_C_COMPILER=gcc-8 \
-DCMAKE_CXX_COMPILER=g++-8
make clang-tblgen llvm-tblgen -j$(nproc)
# copy the artifacts to an absolute path
Expand All @@ -74,8 +76,8 @@ jobs:
-DCLANG_TABLEGEN=/usr/bin/clang-tblgen \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O2 -g -DNDEBUG -static-libgcc -static-libstdc++" \
-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc-7 \
-DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++-7
-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc-8 \
-DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++-8
- name: build
run: |
cd llvm-project-$LLVM_VER/build
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/libclang-linux-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ jobs:
sudo apt-get update
sudo apt-get install -y \
binutils-arm-linux-gnueabihf \
g++-7-arm-linux-gnueabihf \
gcc-7-arm-linux-gnueabihf \
gcc-8 \
g++-8 \
gcc-8-arm-linux-gnueabihf \
g++-8-arm-linux-gnueabihf
- name: build host llvmtblgen/clangtblgen
run: |
mkdir llvm-project-$LLVM_VER/build-host
Expand All @@ -49,8 +51,8 @@ jobs:
-DLLVM_TARGETS_TO_BUILD=X86 \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O2 -g -DNDEBUG -static-libgcc -static-libstdc++" \
-DCMAKE_C_COMPILER=gcc-7 \
-DCMAKE_CXX_COMPILER=g++-7
-DCMAKE_C_COMPILER=gcc-8 \
-DCMAKE_CXX_COMPILER=g++-8
make clang-tblgen llvm-tblgen -j$(nproc)
# copy the artifacts to an absolute path
Expand All @@ -76,8 +78,8 @@ jobs:
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O2 -g -DNDEBUG -static-libgcc -static-libstdc++" \
-DCMAKE_C_FLAGS="-march=armv7" \
-DCMAKE_CXX_FLAGS="-march=armv7" \
-DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc-7 \
-DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++-7
-DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc-8 \
-DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++-8
- name: build
run: |
cd llvm-project-$LLVM_VER/build
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/libclang-macosx-amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
-DLLVM_TARGETS_TO_BUILD=X86 \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O2 -g -DNDEBUG -static-libgcc -static-libstdc++" \
-DCMAKE_C_COMPILER=gcc-9 \
-DCMAKE_CXX_COMPILER=g++-9 \
-DCMAKE_C_COMPILER=gcc-10 \
-DCMAKE_CXX_COMPILER=g++-10 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9
- name: build
run: cd llvm-project-$LLVM_VER/build && make libclang -j$(sysctl -n hw.ncpu)
Expand All @@ -53,6 +53,7 @@ jobs:
du -csh llvm-project-$LLVM_VER/build/lib/libclang.dylib
file llvm-project-$LLVM_VER/build/lib/libclang.dylib
otool -L llvm-project-$LLVM_VER/build/lib/libclang.dylib
dyldinfo -platform -dependents libclang.dylib || true
- name: create and print sha512sum
run: |
cd llvm-project-$LLVM_VER/build/lib
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/libclang-macosx-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
du -csh libclang.dylib
file libclang.dylib
otool -L libclang.dylib
dyld_info -platform -dependents libclang.dylib
dyldinfo -platform -dependents libclang.dylib || true
- name: create and print sha512sum
run: |
cd llvm-project-$LLVM_VER/build/lib
Expand Down

0 comments on commit d0dd8d1

Please sign in to comment.