ESP-IDF:如何添加自定义编译器 flag
向 ESP-IDF 项目添加自定义编译器 flag 的推荐方法是在 main/CMakeLists.txt 末尾添加以下行。*注意:*不要添加到项目根目录的 CMakeLists.txt,而是 main/ 子目录下的。
main_CMakeLists.txt
target_compile_options(${COMPONENT_LIB} PRIVATE -ffast-math)将 -ffast-math 替换为你需要的编译器 flag。
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow