mirror of
https://github.com/RubyMetric/chsrc
synced 2025-11-19 05:57:40 +08:00
Fix macOS compiler on GitHub Actions
This commit is contained in:
16
.github/workflows/build-on-macOS.yml
vendored
16
.github/workflows/build-on-macOS.yml
vendored
@@ -22,13 +22,13 @@ jobs:
|
|||||||
- name: 检出代码
|
- name: 检出代码
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: 检查 Clang 版本
|
- name: 检查编译器版本
|
||||||
run: |
|
run: |
|
||||||
clang --version
|
clang --version
|
||||||
|
echo
|
||||||
- name: 检查 GCC 版本
|
|
||||||
run: |
|
|
||||||
gcc --version
|
gcc --version
|
||||||
|
echo
|
||||||
|
gcc-14 --version
|
||||||
|
|
||||||
- name: 为 arm64 (AArch64) 构建
|
- name: 为 arm64 (AArch64) 构建
|
||||||
run: |
|
run: |
|
||||||
@@ -55,13 +55,13 @@ jobs:
|
|||||||
- name: 检出代码
|
- name: 检出代码
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: 检查 Clang 版本
|
- name: 检查编译器版本
|
||||||
run: |
|
run: |
|
||||||
clang --version
|
clang --version
|
||||||
|
echo
|
||||||
- name: 检查 GCC 版本
|
|
||||||
run: |
|
|
||||||
gcc --version
|
gcc --version
|
||||||
|
echo
|
||||||
|
gcc-14 --version
|
||||||
|
|
||||||
- name: 为 x64 构建
|
- name: 为 x64 构建
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
4
Makefile
4
Makefile
@@ -101,8 +101,10 @@ ifeq ($(MAKECMDGOALS), build-in-ci-release-mode)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# GitHub Actions 上的 macOS 中的 LLVM 太老了
|
# GitHub Actions 上的 macOS 中的 LLVM 太老了
|
||||||
|
# 而且 gcc 被重命名为了 clang
|
||||||
|
# 需要直接指定版本
|
||||||
ifeq ($(On-macOS), 1)
|
ifeq ($(On-macOS), 1)
|
||||||
CC = gcc
|
CC = gcc-14
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user