Skip to content

Commit 69b37d6

Browse files
committed
Fixed the "-s is obsolete" warning when compiling with Clang
1 parent da3c703 commit 69b37d6

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ jobs:
5959
- name: Test
6060
run: build/${{matrix.build-targets.filename}}
6161

62+
- name: Strip (macOS)
63+
if: contains(matrix.build-targets.os, 'macos')
64+
run: strip build/${{matrix.build-targets.filename}}
65+
6266
- uses: actions/upload-artifact@v4
6367
with:
6468
name: ${{matrix.build-targets.uploadName}}

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
1313
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
1414

1515
set(CMAKE_C_FLAGS_DEBUG "-g -Wall")
16-
set(CMAKE_C_FLAGS_RELEASE "-s -O2")
16+
set(CMAKE_C_FLAGS_RELEASE "-O2")
17+
if (NOT CMAKE_C_COMPILER_ID MATCHES "Clang")
18+
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
19+
endif()
1720

1821
if(BUILD_FOR_DOS)
1922
set(CMAKE_C_COMPILER "i586-pc-msdosdjgpp-gcc")

0 commit comments

Comments
 (0)