Commit e8a3ee0
committed
esp32/esp32_common.cmake: Add missing C flags to user C module sources.
On the esp32 port when adding a user C module, the source code for the user
C module was being compiled without certain C flags. Notably the
optimisation flag was missing.
This commit fixes that by explicitly adding the missing C flags to the
compilation of user C modules.
The missing flags were the following, which are now included when building
user C modules (found by inspecting the generated CMake files when building
with ulab):
-ffunction-sections
-fdata-sections
-Wall
-Werror=all
-Wno-error=unused-function
-Wno-error=unused-variable
-Wno-error=unused-but-set-variable
-Wno-error=deprecated-declarations
-Wextra
-Wno-error=extra
-Wno-unused-parameter
-Wno-sign-compare
-Wno-enum-conversion
-gdwarf-4
-ggdb
-mdisable-hardware-atomics
-O2
-fmacro-prefix-map=micropython/ports/esp32=.
-fmacro-prefix-map=espressif/esp-idf=/IDF
-fstrict-volatile-bitfields
-fno-jump-tables
-fno-tree-switch-conversion
See related issue micropython#18880.
Work done in collaboration with @andrewleech.
Signed-off-by: Damien George <damien@micropython.org>1 parent d41b8dc commit e8a3ee0
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
280 | 285 | | |
281 | 286 | | |
282 | 287 | | |
| |||
0 commit comments