Use GCC for macOS on GitHub Actions

This commit is contained in:
Aoran Zeng 2025-07-22 08:45:36 +08:00
parent ba8e841dde
commit d8284ef287
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98

View File

@ -8,7 +8,7 @@
# | sanchuanhehe <wyihe5520@gmail.com> # | sanchuanhehe <wyihe5520@gmail.com>
# | # |
# Created On : <2023-08-28> # Created On : <2023-08-28>
# Last Modified : <2025-07-21> # Last Modified : <2025-07-22>
# #
# 请阅读 ./doc/01-Develop.md 来使用 # 请阅读 ./doc/01-Develop.md 来使用
# -------------------------------------------------------------- # --------------------------------------------------------------
@ -92,11 +92,21 @@ endif
#====== CI release mode 的配置 ======= #====== CI release mode 的配置 =======
ifeq ($(MAKECMDGOALS), build-in-ci-release-mode) ifeq ($(MAKECMDGOALS), build-in-ci-release-mode)
CFLAGS += $(CFLAGS_optimization) CFLAGS += $(CFLAGS_optimization)
# 仅在 Linux 上使用静态链接
# 仅在 Linux 上使用静态链接
ifeq ($(On-Linux), 1) ifeq ($(On-Linux), 1)
CFLAGS += $(CFLAGS_static) CFLAGS += $(CFLAGS_static)
endif endif
ifeq ($(On-macOS), 1)
# 太糟糕了,到现在 (2025-07-22) GitHub Actions 的 macOS (13、15) 中的 LLVM 版本还太低
# 我们代码里有 raw string literal 扩展的用法,所以只能切到 GCC 去
# 但是用户自己编译等情况下,依旧让他们用 Clang因为他们环境的 LLVM 版本可能比较新
CC = gcc
endif
endif endif
#===================================== #=====================================