Skip to content

Commit 1b83238

Browse files
committed
Use gcc on macOS when CI
1 parent 5d89f4f commit 1b83238

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

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

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

25-
- name: 检查编译器版本
25+
- name: 检查 Clang 版本
2626
run: |
2727
clang --version
28+
29+
- name: 检查 GCC 版本
30+
run: |
2831
gcc --version
2932
3033
- name: 为 arm64 (AArch64) 构建
@@ -52,9 +55,12 @@ jobs:
5255
- name: 检出代码
5356
uses: actions/checkout@v4
5457

55-
- name: 检查编译器版本
58+
- name: 检查 Clang 版本
5659
run: |
5760
clang --version
61+
62+
- name: 检查 GCC 版本
63+
run: |
5864
gcc --version
5965
6066
- name: 为 x64 构建

Makefile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,9 @@ ifeq ($(MAKECMDGOALS), build-in-ci-release-mode)
100100
CFLAGS += $(CFLAGS_static)
101101
endif
102102

103+
# GitHub Actions 上的 macOS 中的 LLVM 太老了
103104
ifeq ($(On-macOS), 1)
104-
ifeq ($(CC), clang)
105-
CFLAGS += -fraw-string-literals
106-
endif
107-
endif
108-
109-
# 在 Windows 上交叉编译 Android 时,用的是 clang
110-
ifdef CROSS_BUILD_WINDOWS_FOR_ANDROID
111-
CFLAGS += -fraw-string-literals
105+
CC = gcc
112106
endif
113107

114108
endif

0 commit comments

Comments
 (0)