Skip to content
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

Move src/app configuration to generated header #7789

Merged

Conversation

mspang
Copy link
Contributor

@mspang mspang commented Jun 21, 2021

Problem

We generate headers containing build time configuration choices for good
reason: some builds use multiple build systems and writing out a header
is how we ensure consistent choices are made between them (thus avoiding
ODR violations that can cause catastrophic breakage).

Change overview

Move the command line #defines for src/app to a new generated header.
This makes it safe to enable schema checking in hybrid builds if this is
desired.

Testing

gn gen out/host && gn desc out/host //src/lib defines

ninja -C out/host src/app && cat out/host/gen/include/app/AppBuildConfig.h

We generate headers containing build time configuration choices for good
reason: some builds use multiple build systems and writing out a header
is how we ensure consistent choices are made between them (thus avoiding
ODR violations that can cause catastrophic breakage).

Move the command line #defines for src/app to a new generated header.
This makes it safe to enable schema checking in hybrid builds if this is
desired.
@mspang mspang merged commit e00eac3 into project-chip:master Jun 21, 2021
@mspang mspang deleted the for-chip/generate-app-buildconfig branch June 21, 2021 21:25
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
We generate headers containing build time configuration choices for good
reason: some builds use multiple build systems and writing out a header
is how we ensure consistent choices are made between them (thus avoiding
ODR violations that can cause catastrophic breakage).

Move the command line #defines for src/app to a new generated header.
This makes it safe to enable schema checking in hybrid builds if this is
desired.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants