Skip to content

Commit 2ea11f3

Browse files
committed
Fix macOS compiler on GitHub Actions
1 parent 1b83238 commit 2ea11f3

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

.github/workflows/build-on-macOS.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ jobs:
2222
- name: 检出代码
2323
uses: actions/checkout@v4
2424

25-
- name: 检查 Clang 版本
25+
- name: 检查编译器版本
2626
run: |
2727
clang --version
28-
29-
- name: 检查 GCC 版本
30-
run: |
28+
echo
3129
gcc --version
30+
echo
31+
gcc-14 --version
3232
3333
- name: 为 arm64 (AArch64) 构建
3434
run: |
@@ -55,13 +55,13 @@ jobs:
5555
- name: 检出代码
5656
uses: actions/checkout@v4
5757

58-
- name: 检查 Clang 版本
58+
- name: 检查编译器版本
5959
run: |
6060
clang --version
61-
62-
- name: 检查 GCC 版本
63-
run: |
61+
echo
6462
gcc --version
63+
echo
64+
gcc-14 --version
6565
6666
- name: 为 x64 构建
6767
run: |

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ ifeq ($(MAKECMDGOALS), build-in-ci-release-mode)
101101
endif
102102

103103
# GitHub Actions 上的 macOS 中的 LLVM 太老了
104+
# 而且 gcc 被重命名为了 clang
105+
# 需要直接指定版本
104106
ifeq ($(On-macOS), 1)
105-
CC = gcc
107+
CC = gcc-14
106108
endif
107109

108110
endif

0 commit comments

Comments
 (0)