-
Notifications
You must be signed in to change notification settings - Fork 3k
Change how the config system is used #2162
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
Closed
Closed
Conversation
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 commit address the issue presented in #2073. Previously, mbed_config.h was automatically included by the toolchain. With this change, all the sources that need "mbed_config.h" need to include it manually. However, "mbed.h" now includes "mbed_config.h", so configuration data is automatically available to sources that include "mbed.h". With this change, even if there's no configuration data in the project being built, an empty "mbed_config.h" is generated by the build system. This change looks big, but most of it is an almost complete reversal of #1975. This is likely a breaking change, and needs to be properly communicated.
Up for discussion for now, needs a lot more testing. @theotherjimmy @0xc0170 (Martin, please take a look at the exporter changes). |
Cc @screamerbg |
looks fine to me. I'll test some things with it in a bit. |
@bogdanm 2 quick questions:
|
|
After a talk with @screamerbg, I will close this PR and provide one that fixes #2073 in a different way that keeps the existing |
bogdanm
pushed a commit
that referenced
this pull request
Jul 15, 2016
This commit adds a check for configuration data changes. If a change in configuration data is detected, all the sources in the tree are rebuilt. This is a fix for #2073. #2162 was originally proposed as a fix, but it was agreed that `--preinclude` is a more convenient way to include configuration data, since it can be used to change the behaviour of source files that don't include "mbed_config.h" directly, which is a big advantage when importing 3rd party source trees. Compared to #2162, this commit has the disadvantage of rebuilding all the source files if a configuration change is detected, but it was agreed that the advantage of using `--preinclude` outweighs the disadvantage of the increased compilation time.
Replaced by #2177. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This commit address the issue presented in
#2073. Previously, mbed_config.h
was automatically included by the toolchain. With this change, all the
sources that need "mbed_config.h" need to include it manually. However,
"mbed.h" now includes "mbed_config.h", so configuration data is
automatically available to sources that include "mbed.h".
With this change, even if there's no configuration data in the project
being built, an empty "mbed_config.h" is generated by the build system.
This change looks big, but most of it is an almost complete reversal of
#1975.
This is likely a breaking change, and needs to be properly
communicated.