-
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
Merged
0xc0170
merged 20 commits into
ARMmbed:master
from
fkjagodzinski:armc6_build-enable_lto_for_release
Feb 5, 2020
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
0780f89
ARMC6: Enable link-time optimizer for release profile
8fcb00c
ARMC6: Enable link-time optimizer for develop profile
28b1169
NUVOTON: Fix undefined reference to Reset_Handler_Cascade
fkjagodzinski 8db3b40
STM: change rtc irq handler name
maciejbocianski 783953e
ARMC6 keep __user_setup_stackheap symbol when LTO enabled
maciejbocianski 63d14f3
add dummy SUPER_REALLOC/CALLOC calls to alloc wrappers
maciejbocianski a761ec5
CC3220SF_LAUNCHXL: keep ulDebugHeader symbol in LTO builds
maciejbocianski 12261ed
EV_COG_AD3029LZ: keep IVT_NAME/blank_checksum symbols in LTO builds
maciejbocianski cf1e1dd
EV_COG_AD4050LZ: keep IVT_NAME/blank_checksum symbols in LTO builds
maciejbocianski 5fdacc4
MIMXRT1050_EVt: keep hyperflash_config/image_vector_table symbols in …
maciejbocianski ec839f0
MSP432_LAUNCHPAD: keep interruptVectors symbol in LTO builds
maciejbocianski 9aade4a
NUMAKER_IOT_M263A: keep __vector_handlers symbol in LTO builds
maciejbocianski f0dc4ab
NUMAKER_M252KG: keep __vector_handlers symbol in LTO builds
maciejbocianski ddd2cf8
NUMAKER_PFM_M453: keep __vector_handlers symbol in LTO builds
maciejbocianski ad7f27b
NUMAKER_PFM_NANO130: keep __vector_handlers symbol in LTO builds
maciejbocianski 50c3b10
NUMAKER_PFM_NUC472: keep __vector_handlers symbol in LTO builds
maciejbocianski 6d896f0
NU_PFM_M2351_NPSA: keep __vector_handlers symbol in LTO builds
maciejbocianski e3b8514
NUMAKER_IOT_M487: keep __vector_handlers symbols in LTO builds
maciejbocianski 57ac6c8
component PSA: keep SVCHandler_main/tfm_pendsv_do_schedule symbol in …
maciejbocianski 083e3e5
armc6: make lto an optional profile
maciejbocianski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"ARMC6": { | ||
"common": ["-flto"], | ||
"ld": ["--lto", "--lto_level=Oz"] | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Maybe I'm being dense, but why aren't these calls using
SUPER_REALLOC
andSUPER_CALLOC
anyway? Why are they messing around re-implementing them?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.
Okay, I see the point - if you did use them, you'd have to reimplement the stuff in your malloc wrapper. Probably a bit bigger overall.
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.
I'm not sure how that fix actually works, mind - so you've inserted a (sort-of) call to the $$Super, but how does that persuade the LTO to retain the $$Sub?
Or maybe that activates a magic heuristic in the compiler - if a function calls any $$Super, assume it's referenced? Hmm. But then why not treat any $$Sub as referenced?
Can you explain how you got to this?
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.
@jamesbeyond found that difference between
SUB_CALLOC/REALOC
andSUB_MALLOC/FREE
And then by the analogy I have added dummy
SUPER_CALLOC/REALOC
calls insideSUB_CALLOC/REALOC