-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-Omax
and LTO
have no mapping/abstraction yet
#1886
Comments
-Omax
and LTO
have no mapping/abstraction yet
What generic Can we precisely establish what should be implemented for each supported toolchain?
Please note Arm states that |
Maybe the best is to add another control to enable |
IAR compiler optimizations can be directed for size (-Ohz), speed (-Ohs) or balanced (-Oh). The linker has no general -O option, but it can enable specific optimizations. I discussed this with the compiler team: --vfe is a size optimization (discards unused virtual functions), the cost is link time (minimal) so it should be used --inline inlines small functions (the payload of the target fits in the code). This is a speed optimization. This can be problematic if you place a breakpoint in foobar, and then it is optimized away so that the call to foobar never takes place. In EW this is default on for Release build configurations. --merge_duplicate_sections is a size optimization, like the name implies duplicate sections are eliminated. This is a relatively expensive (paid with link time) optimization. It is not active by default in EW. Generally speaking I agree with @ReinhardKeil that it would probably be best to have a separate control for linker optimization, mostly given that they are so specific. |
Proposal separate option: Also AC6 offers the option IAR compiler uses multi-file compilation which at this point in time cannot handled by CMake. Therefore this option should be ignored for IAR. |
Describe The Problem To Be Solved
AC6 has -Omax and several compilers offer Link Time Optimization (LTO). We should evaluate if we can add features for it.
See also ARM-software/vscode-cmsis-csolution#131
The text was updated successfully, but these errors were encountered: