-
Notifications
You must be signed in to change notification settings - Fork 3k
ARMC6: Add a build profile extension with the link-time optimizer enabled #11874
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
ARMC6: Add a build profile extension with the link-time optimizer enabled #11874
Conversation
@fkjagodzinski, thank you for your changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also do it for develop?
[email protected], ARMC6, develop profile, Windows host
|
Set to 5.15 as agreed. I'll trigger the first CI run |
Test run: FAILEDSummary: 3 of 4 test jobs failed Failed test jobs:
|
Seems this PR only touched ARMC6 options, not sure why IAR and GCC failed. I'll try to restart CI |
Test run: FAILEDSummary: 3 of 4 test jobs failed Failed test jobs:
|
The artifacts report green for GCC and IAR. just focus on failures in ARM:
@fkjagodzinski Please review |
This error is due to lack of |
@kjbracey-arm if the GCC version of this PR has been marked as a breaking change is this one different ? |
@fkjagodzinski similarly to the GCC equivalent changes if the user has to do anything to use these changes (such as adding an additional header file), could you please fill in the impact and migration sections in the release notes accordingly ? Thanks |
Added one commit from @maciejbocianski that fixes |
CI restarted |
Test run: FAILEDSummary: 3 of 4 test jobs failed Failed test jobs:
|
That There is a similar trap for types that can hit LTO - you're not allowed to have duplicate type names in different files in C++. To avoid that you have to stick them in an anonymous namespace, which is the equivalent of making the type static/local. But this seems legal to me. At least as long as you weren't including a header file declaring the external |
Another problem which I haven't solved yet is: Error is visible when |
I've added two more fixes form https://github.com/maciejbocianski/mbed-os/commits/fix_armc6_lto. @jamesbeyond, @0xc0170 I think this is ready to pass CI now. |
CI started Isn't there a better way for d71637b (using dummy value there to keep the function in) ? |
Add a "used" attribute to __vector_handlers to fix ARMC6 build with the "-flto" flag. (Error: L6236E: No section matches selector - no section to be FIRST/LAST.) This attribute, attached to a function/variable, means that code must be emitted for the function even if it appears that the function is not referenced.
Add a "used" attribute to __vector_handlers to fix ARMC6 build with the "-flto" flag. (Error: L6236E: No section matches selector - no section to be FIRST/LAST.) This attribute, attached to a function/variable, means that code must be emitted for the function even if it appears that the function is not referenced.
Add a "used" attribute to __vector_handlers to fix ARMC6 build with the "-flto" flag. (Error: L6236E: No section matches selector - no section to be FIRST/LAST. ) This attribute, attached to a function/variable, means that code must be emitted for the function even if it appears that the function is not referenced.
…LTO builds Add a "used" attribute to SVCHandler_main/tfm_pendsv_do_schedule to fix ARMC6 build with the "-flto" flag. This attribute, attached to a function/variable, means that code must be emitted for the function even if it appears that the function is not referenced.
cd42f67
to
083e3e5
Compare
rebase done |
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any docs PR for this profile extension?
@bulislaw @kjbracey-arm Please review the final version, it is be ready to go in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, do we have docs following this PR?
There is no docs yet @jamesbeyond @bulislaw |
We are prepare docs, and will be put into: |
Description (required)
Summary of change (What the change is for and why)
Added an
lto
build profile extension forARMC6
toolchain.-flto
tocommon
flags,--lto
&--lto_level=Oz
told
flags.Results
Product: ARM Compiler 6.11 Professional Component: ARM Compiler 6.11 Tool: armclang [5d3b4200]
[email protected]
679d248
c6a655f
[email protected]
679d248
c6a655f
Build commands used to produce the above results
mbed-os-example-blinky
mbed-cloud-client-example
Documentation (Details of any document updates required)
Pull request type (required)
Test results (required)
Reviewers (optional)
@jamesbeyond @kjbracey-arm @maciejbocianski
Release Notes (required for feature/major PRs)
Summary of changes
Add a build profile extension with the link-time optimizer enabled for ARMC6 toolchain.
Impact of changes
Migration actions required