xuxin930 opened a new issue, #11452: URL: https://github.com/apache/nuttx/issues/11452
Here is an example: Our current Toolchain File overwrite the ARCHIVE command https://github.com/apache/nuttx/blob/992719730f355ed3132c3204153f919822870074/arch/arm/src/cmake/Toolchain.cmake#L92-L94 but `<CMAKE_AR>` makes different choices depending on whether `LTO` is enabled or not. https://github.com/apache/nuttx/blob/992719730f355ed3132c3204153f919822870074/arch/arm/src/cmake/Toolchain.cmake#L75-L86 If everything is configured in defconfig, everything will work normally. But if `LTO` is **not** enabled in defconfig and I call `cmake --build -t menuconfig` to open `LTO`, then the expectation is **different** from the setting. Because the execution of CMake is divided into three stages: **_configure_**, **_generate_** and **_build_**. the Toolchain command (such as CMAKE_AR above) is configured in stages **_configure_**, **_generate_** and is solidified in the generated build file (such as Makefile). so in the end this menuconfig modification will NOT take effect. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
