This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to use --flto to link STATIC library

Hi

I want to build a static library for my project with gnuarm toolchain. To decrease the code size, I set the library CMAKE_C_FLAGS as "-flto", however my project gives the build error about undefined reference symbols from the library as I linked the library with --lto. How to solve this issue?

Best Regards

Jianliang Shen