Skip to content

Commit d8284ef

Browse files
committed
Use GCC for macOS on GitHub Actions
1 parent ba8e841 commit d8284ef

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Makefile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# | sanchuanhehe <[email protected]>
99
# |
1010
# Created On : <2023-08-28>
11-
# Last Modified : <2025-07-21>
11+
# Last Modified : <2025-07-22>
1212
#
1313
# 请阅读 ./doc/01-Develop.md 来使用
1414
# --------------------------------------------------------------
@@ -92,11 +92,21 @@ endif
9292

9393
#====== CI release mode 的配置 =======
9494
ifeq ($(MAKECMDGOALS), build-in-ci-release-mode)
95+
9596
CFLAGS += $(CFLAGS_optimization)
96-
# 仅在 Linux 上使用静态链接
97+
98+
# 仅在 Linux 上使用静态链接
9799
ifeq ($(On-Linux), 1)
98100
CFLAGS += $(CFLAGS_static)
99101
endif
102+
103+
ifeq ($(On-macOS), 1)
104+
# 太糟糕了,到现在 (2025-07-22) GitHub Actions 的 macOS (13、15) 中的 LLVM 版本还太低
105+
# 我们代码里有 raw string literal 扩展的用法,所以只能切到 GCC 去
106+
# 但是用户自己编译等情况下,依旧让他们用 Clang,因为他们环境的 LLVM 版本可能比较新
107+
CC = gcc
108+
endif
109+
100110
endif
101111
#=====================================
102112

0 commit comments

Comments
 (0)