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

Use generated headers consistently on darwin #11538

Merged
merged 1 commit into from
Nov 9, 2021

Conversation

mspang
Copy link
Contributor

@mspang mspang commented Nov 8, 2021

Problem

Manually setting #defines in the xcodeproj is error prone, and
mismatched defines between the two build systems can cause ODR related
undefined behaviors.

Change overview

Use the generated headers to propagate configuration from GN to Xcode
builds. This just requires setting CHIP_HAVE_CONFIG_H.

Testing

GitHub Actions.

Manually setting #defines in the xcodeproj is error prone, and
mismatched defines between the two build systems can cause ODR related
undefined behaviors.

Use the generated headers to propagate configuration from GN to Xcode
builds. This just requires setting CHIP_HAVE_CONFIG_H.
@github-actions
Copy link

github-actions bot commented Nov 8, 2021

PR #11538: Size comparison from 5c73522 to 2f72357

Decreases (1 build for esp32)
platform target config section 5c73522 2f72357 change % change
esp32 all-clusters-app m5stack (read only) 911343 911327 -16 -0.0
.flash.text 911343 911327 -16 -0.0
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
platform target config section 5c73522 2f72357 change % change
efr32 lighting-app BRD4161A (read only) 742064 742064 0 0.0
(read/write) 116076 116076 0 0.0
.bss 114292 114292 0 0.0
.data 1784 1784 0 0.0
.text 742056 742056 0 0.0
BRD4161A+rpc (read only) 729592 729592 0 0.0
(read/write) 132700 132700 0 0.0
.bss 130796 130796 0 0.0
.data 1900 1900 0 0.0
.text 729584 729584 0 0.0
lock-app BRD4161A (read only) 721344 721344 0 0.0
(read/write) 113892 113892 0 0.0
.bss 112148 112148 0 0.0
.data 1744 1744 0 0.0
.text 721336 721336 0 0.0
window-app BRD4161A (read only) 722240 722240 0 0.0
(read/write) 114220 114220 0 0.0
.bss 112468 112468 0 0.0
.data 1748 1748 0 0.0
.text 722232 722232 0 0.0
esp32 all-clusters-app c3devkit (read only) 880142 880142 0 0.0
(read/write) 1306328 1306328 0 0.0
.dram0.bss 58240 58240 0 0.0
.dram0.data 16472 16472 0 0.0
.flash.rodata 198376 198376 0 0.0
.flash.text 880142 880142 0 0.0
.iram0.text 57526 57526 0 0.0
m5stack (read only) 911343 911327 -16 -0.0
(read/write) 423648 423648 0 0.0
.dram0.bss 60744 60744 0 0.0
.dram0.data 32108 32108 0 0.0
.flash.rodata 204632 204632 0 0.0
.flash.text 911343 911327 -16 -0.0
.iram0.text 125115 125115 0 0.0
k32w lighting-app k32w061+se05x+release (read/write) 698872 698872 0 0.0
.bss 77816 77816 0 0.0
.data 1912 1912 0 0.0
.text 613344 613344 0 0.0
lock-app k32w061+debug (read/write) 591696 591696 0 0.0
.bss 68348 68348 0 0.0
.data 1880 1880 0 0.0
.text 515668 515668 0 0.0
shell k32w061+debug (read/write) 657192 657192 0 0.0
.bss 78988 78988 0 0.0
.data 1848 1848 0 0.0
.text 570556 570556 0 0.0
linux all-clusters-app debug (read only) 1703761 1703761 0 0.0
(read/write) 125728 125728 0 0.0
.bss 57200 57200 0 0.0
.data 1042 1042 0 0.0
.data.rel.ro 62208 62208 0 0.0
.dynamic 592 592 0 0.0
.got 4088 4088 0 0.0
.init 27 27 0 0.0
.init_array 552 552 0 0.0
.rodata 139221 139221 0 0.0
.text 1431266 1431266 0 0.0
bridge-app debug+rpc (read only) 1291797 1291797 0 0.0
(read/write) 76272 76272 0 0.0
.bss 42096 42096 0 0.0
.data 1568 1568 0 0.0
.data.rel.ro 27640 27640 0 0.0
.dynamic 592 592 0 0.0
.got 3952 3952 0 0.0
.init 27 27 0 0.0
.init_array 408 408 0 0.0
.rodata 111028 111028 0 0.0
.text 1085045 1085045 0 0.0
chip-tool debug (read only) 4931021 4931021 0 0.0
(read/write) 133160 133160 0 0.0
.bss 25328 25328 0 0.0
.data 2224 2224 0 0.0
.data.rel.ro 100192 100192 0 0.0
.dynamic 592 592 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 432 432 0 0.0
.rodata 233488 233488 0 0.0
.text 4428757 4428757 0 0.0
lighting-app debug+rpc (read only) 1552809 1552809 0 0.0
(read/write) 109272 109272 0 0.0
.bss 47768 47768 0 0.0
.data 1170 1170 0 0.0
.data.rel.ro 55040 55040 0 0.0
.dynamic 608 608 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 536 536 0 0.0
.rodata 129649 129649 0 0.0
.text 1289746 1289746 0 0.0
ota-provider-app debug (read only) 1251001 1251001 0 0.0
(read/write) 74472 74472 0 0.0
.bss 44192 44192 0 0.0
.data 752 752 0 0.0
.data.rel.ro 24440 24440 0 0.0
.dynamic 592 592 0 0.0
.got 4016 4016 0 0.0
.init 27 27 0 0.0
.init_array 448 448 0 0.0
.rodata 112232 112232 0 0.0
.text 1042834 1042834 0 0.0
ota-requestor-app debug (read only) 1329297 1329297 0 0.0
(read/write) 83728 83728 0 0.0
.bss 52320 52320 0 0.0
.data 816 816 0 0.0
.data.rel.ro 25448 25448 0 0.0
.dynamic 592 592 0 0.0
.got 3992 3992 0 0.0
.init 27 27 0 0.0
.init_array 520 520 0 0.0
.rodata 124208 124208 0 0.0
.text 1107202 1107202 0 0.0
shell debug (read only) 787113 787113 0 0.0
(read/write) 64648 64648 0 0.0
.bss 23240 23240 0 0.0
.data 242 242 0 0.0
.data.rel.ro 36656 36656 0 0.0
.dynamic 592 592 0 0.0
.got 3528 3528 0 0.0
.init 27 27 0 0.0
.init_array 344 344 0 0.0
.rodata 77903 77903 0 0.0
.text 607938 607938 0 0.0
tv-app debug (read only) 1816769 1816769 0 0.0
(read/write) 296896 296896 0 0.0
.bss 229840 229840 0 0.0
.data 2704 2704 0 0.0
.data.rel.ro 58696 58696 0 0.0
.dynamic 592 592 0 0.0
.got 4408 4408 0 0.0
.init 27 27 0 0.0
.init_array 616 616 0 0.0
.rodata 155304 155304 0 0.0
.text 1519346 1519346 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2291576 2291576 0 0.0
.bss 179244 179244 0 0.0
.data 5232 5232 0 0.0
.heap 851968 851968 0 0.0
.text 1254176 1254176 0 0.0
lighting-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2271672 2271672 0 0.0
.bss 172300 172300 0 0.0
.data 5584 5584 0 0.0
.heap 858560 858560 0 0.0
.text 1234272 1234272 0 0.0
lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2249392 2249392 0 0.0
.bss 171196 171196 0 0.0
.data 5568 5568 0 0.0
.heap 859680 859680 0 0.0
.text 1211992 1211992 0 0.0
pigweed-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 1139744 1139744 0 0.0
.bss 11752 11752 0 0.0
.data 4368 4368 0 0.0
.heap 1020328 1020328 0 0.0
.text 103128 103128 0 0.0
shell CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2048720 2048720 0 0.0
.bss 156264 156264 0 0.0
.data 4976 4976 0 0.0
.heap 875208 875208 0 0.0
.text 1011320 1011320 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 (read/write) 861491 861491 0 0.0
bss 111284 111284 0 0.0
rodata 96932 96932 0 0.0
text 577656 577656 0 0.0
nrf52840dk_nrf52840+rpc (read/write) 823839 823839 0 0.0
bss 107636 107636 0 0.0
rodata 88112 88112 0 0.0
text 551804 551804 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 786550 786550 0 0.0
bss 112656 112656 0 0.0
rodata 92192 92192 0 0.0
text 507128 507128 0 0.0
lock-app nrf52840dk_nrf52840 (read/write) 838215 838215 0 0.0
bss 110316 110316 0 0.0
rodata 93304 93304 0 0.0
text 559136 559136 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 763510 763510 0 0.0
bss 111728 111728 0 0.0
rodata 88608 88608 0 0.0
text 488700 488700 0 0.0
pigweed-app nrf52840dk_nrf52840 (read/write) 497323 497323 0 0.0
bss 51824 51824 0 0.0
rodata 45776 45776 0 0.0
text 339436 339436 0 0.0
pump-app nrf52840dk_nrf52840 (read/write) 844307 844307 0 0.0
bss 110456 110456 0 0.0
rodata 95012 95012 0 0.0
text 563300 563300 0 0.0
pump-controller-app nrf52840dk_nrf52840 (read/write) 838071 838071 0 0.0
bss 110352 110352 0 0.0
rodata 93304 93304 0 0.0
text 558872 558872 0 0.0
shell nrf52840dk_nrf52840 (read/write) 776087 776087 0 0.0
bss 109104 109104 0 0.0
rodata 72540 72540 0 0.0
text 519840 519840 0 0.0
nrf5340dk_nrf5340_cpuapp (read/write) 691142 691142 0 0.0
bss 110088 110088 0 0.0
rodata 67184 67184 0 0.0
text 440448 440448 0 0.0
p6 all-clusters-app default (read/write) 2298632 2298632 0 0.0
.bss 111776 111776 0 0.0
.data 2536 2536 0 0.0
.heap 919032 919032 0 0.0
.text 1256896 1256896 0 0.0
lock-app default (read/write) 2211320 2211320 0 0.0
.bss 100584 100584 0 0.0
.data 2408 2408 0 0.0
.heap 930352 930352 0 0.0
.text 1169584 1169584 0 0.0
qpg lighting-app qpg6100+debug (read only) 490188 490188 0 0.0
(read/write) 114140 114140 0 0.0
.bss 50976 50976 0 0.0
.data 1012 1012 0 0.0
.text 484868 484868 0 0.0
lock-app qpg6100+debug (read only) 466528 466528 0 0.0
(read/write) 114144 114144 0 0.0
.bss 49920 49920 0 0.0
.data 968 968 0 0.0
.text 461208 461208 0 0.0
persistent-storage-app qpg6100+debug (read only) 153364 153364 0 0.0
(read/write) 114140 114140 0 0.0
.bss 19600 19600 0 0.0
.data 364 364 0 0.0
.text 148044 148044 0 0.0
telink lighting-app tlsr9518adk80d (read/write) 663082 663082 0 0.0
bss 69096 69096 0 0.0
noinit 33216 33216 0 0.0
text 458092 458092 0 0.0

@woody-apple
Copy link
Contributor

Fast tracking, given platform changes approved by (me) a platform maintainer.

@bzbarsky-apple bzbarsky-apple merged commit 372dc6a into project-chip:master Nov 9, 2021
* chip::System project configuration for standalone builds on iOS
*
*/
#ifndef SYSTEMPROJECTCONFIG_H
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not #pragma once ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry copied from config/standalone/SystemProjectConfig.h which apparently wasn't migrated.

@mspang mspang deleted the for-chip/xcode-config branch November 9, 2021 20:04
PSONALl pushed a commit to PSONALl/connectedhomeip that referenced this pull request Dec 3, 2021
Manually setting #defines in the xcodeproj is error prone, and
mismatched defines between the two build systems can cause ODR related
undefined behaviors.

Use the generated headers to propagate configuration from GN to Xcode
builds. This just requires setting CHIP_HAVE_CONFIG_H.
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.

4 participants