Skip to content

Commit 18be9dc

Browse files
committed
fix: reduce macosx build size #40
1 parent 0c301b4 commit 18be9dc

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

.github/workflows/build-amd64.yml

+8-10
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
shacmd: 'sha512sum'
6464
- os: macosx
6565
runner: macos-14
66-
os-cmake-args: '-DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++ -flto" -DCMAKE_OSX_DEPLOYMENT_TARGET=11 ${MACOS_CMAKE_ARGS}'
66+
os-cmake-args: '-DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++ -flto -ffunction-sections -fdata-sections" -DCMAKE_OSX_DEPLOYMENT_TARGET=11 ${MACOS_CMAKE_ARGS}'
6767
build-args: '-j$(sysctl -n hw.ncpu)'
6868
bindir: '/build/bin'
6969
dotexe: ''
@@ -173,9 +173,9 @@ jobs:
173173
cat clang-apply-replacements-${{ env.suffix }}.sha512sum
174174
- name: upload artifacts
175175
if: ${{ github.actor != 'dependabot[bot]' }} || github.event_name != 'pull_request'
176-
uses: actions/upload-artifact@v3
176+
uses: actions/upload-artifact@v4
177177
with:
178-
name: clang-tools
178+
name: clang-tools-${{ matrix.release }}-${{ env.suffix }}
179179
path: "${{ matrix.release }}${{ matrix.bindir }}/clang-*-${{ env.suffix }}*"
180180
retention-days: 1
181181
draft-release:
@@ -184,15 +184,13 @@ jobs:
184184
needs: build
185185
steps:
186186
- name: download artifacts
187-
uses: actions/download-artifact@v3
188-
with:
189-
name: clang-tools
187+
uses: actions/download-artifact@v4
190188
- name: list files
191189
run: ls -laR .
192190
- name: draft release
193-
uses: xresloader/upload-to-github-release@v1
194-
env:
195-
GITHUB_TOKEN: ${{ secrets.TOKEN }}
191+
uses: svenstaro/upload-release-action@v2
196192
with:
197-
file: "clang-*"
193+
repo_token: ${{ secrets.GITHUB_TOKEN }}
198194
draft: true
195+
file_glob: true
196+
file: clang-*/**/*

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<!-- [![Build](https://github.com/cpp-linter/clang-tools-static-binaries/actions/workflows/build-amd64.yml/badge.svg)](https://github.com/cpp-linter/clang-tools-static-binaries/actions/workflows/build-amd64.yml)
44
[![Test](https://github.com/cpp-linter/clang-tools-static-binaries/actions/workflows/test.yml/badge.svg)](https://github.com/cpp-linter/clang-tools-static-binaries/actions/workflows/test.yml) -->
55
![](https://img.shields.io/badge/platform-linux--64%20%7C%20win--64%20%7C%20osx--64%20-blue)
6-
![Maintenance](https://img.shields.io/maintenance/yes/2024)
6+
![Maintenance](https://img.shields.io/maintenance/yes/2025)
77

88
Includes **[clang-format](https://clang.llvm.org/docs/ClangFormat.html), [clang-tidy](https://clang.llvm.org/extra/clang-tidy/), [clang-query](https://github.com/llvm/llvm-project/tree/main/clang-tools-extra/clang-query) and [clang-apply-replacements](https://github.com/llvm/llvm-project/tree/main/clang-tools-extra/clang-apply-replacements)**.
99

0 commit comments

Comments
 (0)