-
Notifications
You must be signed in to change notification settings - Fork 3k
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
CMake: pass macros to ARM toolchain linker #13930
Conversation
@LDong-Arm, thank you for your changes. |
I knew GCC Arm did not pass it by default but I don't recall why I was under impression ARMClang is passing them to linker by default 🙄 If that is the case, making the symbols already done for gcc also to other toolchain +1. I'll review. |
No matter what compiler we use, the build system needs to macros in some way. And CMake doesn't pass macros (compile definitions) at linking stage by default, so we need to do it. |
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.
LGTM
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 wonder if we can fix this via toolchain file (add these macros to linker by default for both toolchains). I'll create a ticket for this to review
CI started |
Jenkins CI Test : ❌ FAILEDBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
I've seen the cloud-client-test failure in multiple PRs today, might be a CI issue? |
CI restarted |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Summary of changes
Compile definitions (macros) should be passed to both GCC_ARM and ARM toolchains:
--predefine=@<definition_file>.txt
directly toarmlink
. This PR adds such support.This is necessary, if an application needs to start with an offset (
MBED_APP_START
), e.g. to be loaded by a bootloader.Impact of changes
Macros are now passed to the Arm Compiler linker.
Migration actions required
None.
Documentation
None.
Pull request type
Test results
Reviewers
@0xc0170 @hugueskamba @rajkan01