Skip to content

Commit 240fbd3

Browse files
committed
Improve readability and macOS linker options, remove unused flags
see mcuee/avrdude@3f3f739
1 parent 824e1f0 commit 240fbd3

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

.github/workflows/release.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: release
1+
name: Release
22

33
env:
44
# The name of the project
@@ -88,9 +88,24 @@ jobs:
8888
run: |
8989
if [ "${{ matrix.config.os }}" = "macOS" ]; then
9090
# For darwin we disable the static flags (not supported by clang) and we make some adjustments
91-
cmake -DCMAKE_C_COMPILER=${{ matrix.config.cross_compiler }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cross_compiler }}++ -DCMAKE_AR=${{ matrix.config.ar }} -DCMAKE_LINKER=${{ matrix.config.ld}} -DCMAKE_EXE_LINKER_FLAGS="-L/opt/lib/${{ matrix.config.cross_compile }}/lib/" -DCMAKE_C_FLAGS="-I/opt/lib/${{ matrix.config.cross_compile }}/include -pthread -framework Foundation -framework IOKit -framework Cocoa -framework Security -DHAVE_USB_H" -DCMAKE_PREFIX_PATH=/opt/lib/${{ matrix.config.cross_compile }}/ -DHAVE_LIBFTDI="NO" -DUSE_STATIC_LIBS="ON" -B build/
91+
cmake -DCMAKE_C_COMPILER=${{ matrix.config.cross_compiler }} \
92+
-DCMAKE_AR=${{ matrix.config.ar }} \
93+
-DCMAKE_LINKER=${{ matrix.config.ld}} \
94+
-DCMAKE_EXE_LINKER_FLAGS="-L/opt/lib/${{ matrix.config.cross_compile }}/lib/ -lobjc -Wl,-framework,IOKit -Wl,-framework,AppKit -Wl,-framework,CoreFoundation -Wl,-framework,Security" \
95+
-DCMAKE_C_FLAGS="-I/opt/lib/${{ matrix.config.cross_compile }}/include -pthread -DHAVE_USB_H" \
96+
-DCMAKE_PREFIX_PATH=/opt/lib/${{ matrix.config.cross_compile }}/ \
97+
-DHAVE_LIBFTDI="NO" \
98+
-DUSE_STATIC_LIBS="ON" \
99+
-B build/
92100
else
93-
cmake -DCMAKE_C_COMPILER=${{ matrix.config.cross_compile }}-gcc -DCMAKE_CXX_COMPILER=${{ matrix.config.cross_compile }}-g++ -DCMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++" -DCMAKE_C_FLAGS="-I/opt/lib/${{ matrix.config.cross_compile }}/include/libusb-1.0/ -I/opt/lib/${{ matrix.config.cross_compile }}/include -pthread" -DCMAKE_PREFIX_PATH=/opt/lib/${{ matrix.config.cross_compile }}/ -DHAVE_LIBFTDI="NO" -DUSE_STATIC_LIBS="ON" -B build/
101+
cmake -DCMAKE_C_COMPILER=${{ matrix.config.cross_compile }}-gcc \
102+
-DCMAKE_CXX_COMPILER=${{ matrix.config.cross_compile }}-g++ \
103+
-DCMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++" \
104+
-DCMAKE_C_FLAGS="-I/opt/lib/${{ matrix.config.cross_compile }}/include/libusb-1.0/ -I/opt/lib/${{ matrix.config.cross_compile }}/include -pthread" \
105+
-DCMAKE_PREFIX_PATH=/opt/lib/${{ matrix.config.cross_compile }}/ \
106+
-DHAVE_LIBFTDI="NO" \
107+
-DUSE_STATIC_LIBS="ON" \
108+
-B build/
94109
fi
95110
cmake --build build/ -v
96111

0 commit comments

Comments
 (0)