Skip to content

Commit c8ce408

Browse files
2 parents 83a3c43 + 8a6ff0f commit c8ce408

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

scripts/build_mpos.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,14 @@ PY
195195
stream_wav_file="$codebasedir"/internal_filesystem/lib/mpos/audio/stream_wav.py
196196
sed -i.backup 's/^@micropython\.viper$/#@micropython.viper/' "$stream_wav_file"
197197

198+
# Suppress warnings that newer Clang (17+) treats as errors on macOS.
199+
# GCC on Linux doesn't have -Wgnu-folding-constant so this must be skipped there.
200+
unix_makefile="$codebasedir"/lvgl_micropython/lib/micropython/ports/unix/Makefile
201+
if [ "$(uname -s)" = "Darwin" ]; then
202+
echo "Temporarily suppressing Clang warnings for macOS build..."
203+
sed -i.backup 's/^CWARN = -Wall -Werror$/CWARN = -Wall -Werror -Wno-error=gnu-folding-constant -Wno-error=missing-field-initializers/' "$unix_makefile"
204+
fi
205+
198206
# If it's still running, kill it, otherwise "text file busy"
199207
pkill -9 -f /lvgl_micropy_unix
200208
# LV_CFLAGS are passed to USER_C_MODULES (compiler flags only, no linker flags)
@@ -217,6 +225,15 @@ PY
217225
echo "Restoring @micropython.viper decorator..."
218226
sed -i.backup 's/^#@micropython\.viper$/@micropython.viper/' "$stream_wav_file"
219227
rm "$stream_wav_file".backup
228+
<<<<<<< HEAD
229+
=======
230+
231+
# Restore original Makefile CWARN (only if we patched it on macOS)
232+
if [ -f "$unix_makefile".backup ]; then
233+
echo "Restoring unix Makefile CWARN..."
234+
mv "$unix_makefile".backup "$unix_makefile"
235+
fi
236+
>>>>>>> 8a6ff0f4e81d0a4ae707907e5ec960239751472d
220237
else
221238
echo "invalid target $target"
222239
fi

0 commit comments

Comments
 (0)